*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    :root {
      --primary:       #1a6b4a;
      --primary-dark:  #145539;
      --primary-pale:  #e8f5ef;
      --primary-mid:   #c5e6d4;
      --bg:            #ffffff;
      --text:          #111a15;
      --muted:         #4a5a50;
      --faint:         #68776f;
      --border:        #d4ddd8;
      --radius:        10px;
      --font:          system-ui, -apple-system, 'Segoe UI', sans-serif;
    }

    html, body {
      font-family: var(--font);
      background: var(--bg);
      color: var(--text);
      line-height: 1.5;
      font-size: 16px;
      -webkit-font-smoothing: antialiased;
    }

    body {
      padding: 16px;
      max-width: 520px;
      margin: 0 auto;
    }

    .widget {
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 18px;
      background: var(--bg);
    }
    .business-name {
      margin-bottom: 4px;
      color: var(--primary-dark);
	      font-size: 1rem;
      font-weight: 800;
      letter-spacing: 0.04em;
      text-transform: uppercase;
    }

    .title {
      font-size: 1rem;
      font-weight: 700;
      margin-bottom: 4px;
      color: var(--text);
    }

    .sub {
      font-size: 1rem;
      color: var(--muted);
      margin-bottom: 14px;
    }

    .input, .textarea {
      width: 100%;
      font-family: var(--font);
      font-size: 1rem;
      padding: 10px 12px;
      border: 1.5px solid var(--border);
      border-radius: var(--radius);
      background: var(--bg);
      color: var(--text);
      outline: none;
      transition: border-color 0.15s, box-shadow 0.15s;
    }
    .input:focus, .textarea:focus {
      border-color: var(--primary);
      box-shadow: 0 0 0 3px rgba(26, 107, 74, 0.12);
    }
    .help, .attribution {
      margin-top: 5px;
      color: var(--muted);
	      font-size: 1rem;
      line-height: 1.4;
    }
    .attribution { margin: 12px auto 0; max-width: 500px; color: var(--faint); text-align: center; }
    .attribution a { color: var(--primary-dark); }
    .autocomplete-wrap { position: relative; }
    .autocomplete-list {
      position: absolute; z-index: 30; top: calc(100% + 3px); left: 0; right: 0;
      max-height: 210px; overflow-y: auto; background: var(--bg);
      border: 1px solid var(--border); border-radius: var(--radius);
      box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    }
    .autocomplete-list:empty { display: none; }
    .autocomplete-option {
      display: block; width: 100%; padding: 9px 10px; border: 0;
      border-bottom: 1px solid var(--border); background: transparent;
      color: var(--text); font: inherit; text-align: left; cursor: pointer;
    }
    .autocomplete-option:last-child { border-bottom: 0; }
    .autocomplete-option:hover, .autocomplete-option.active,
    .autocomplete-option[aria-selected="true"] { background: var(--primary-pale); color: var(--primary-dark); }
    .scope-selector { margin-top: 10px; padding: 0; border: 0; }
	    .scope-selector legend { margin-bottom: 5px; color: var(--text); font-size: 1rem; font-weight: 700; }
    .scope-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
    .scope-option {
      display: flex; align-items: flex-start; gap: 5px; min-height: 58px;
      padding: 7px; border: 1.5px solid var(--border); border-radius: var(--radius);
      background: var(--bg); cursor: pointer;
    }
    .scope-option:has(input:checked) { border-color: var(--primary); background: var(--primary-pale); }
    .scope-option input { margin-top: 3px; accent-color: var(--primary); }
    .scope-option span { display: grid; gap: 1px; }
	    .scope-option strong { font-size: 1rem; }
	    .scope-option small { color: var(--muted); font-size: 1rem; line-height: 1.15; }
    .textarea {
      resize: vertical;
      min-height: 60px;
      font-family: var(--font);
    }

    .row { margin-top: 10px; }
    .row:first-child { margin-top: 0; }

    .btn {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      width: 100%;
      background: var(--primary);
      color: white;
      border: none;
      border-radius: var(--radius);
      padding: 11px;
      font-family: var(--font);
      font-size: 1rem;
      font-weight: 700;
      cursor: pointer;
      margin-top: 12px;
      transition: background 0.15s, transform 0.1s;
    }
    .btn:hover { background: var(--primary-dark); }
    .btn:active { transform: translateY(1px); }
    .btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

    .btn.secondary {
      background: var(--bg);
      color: var(--primary);
      border: 1.5px solid var(--primary-mid);
    }
    .btn.secondary:hover { background: var(--primary-pale); }

    .loading {
      text-align: center;
      padding: 14px 0;
      color: var(--muted);
      font-size: 1rem;
    }
    .loading .spinner {
      display: inline-block;
      width: 14px; height: 14px;
      border: 2px solid var(--primary-mid);
      border-top-color: var(--primary);
      border-radius: 50%;
      animation: spin 0.7s linear infinite;
      vertical-align: middle;
      margin-right: 6px;
    }
    @keyframes spin { to { transform: rotate(360deg); } }

    .error {
      padding: 10px 12px;
      color: #b44;
      font-size: 1rem;
      background: #fff3f3;
      border: 1px solid #f4cfcf;
      border-radius: var(--radius);
      margin-top: 12px;
    }

    .result {
      margin-top: 14px;
      padding: 14px;
      background: var(--primary-pale);
      border: 1px solid var(--primary-mid);
      border-radius: var(--radius);
    }
    .result-label {
      font-size: 1rem;
      font-weight: 700;
      color: var(--primary);
      text-transform: uppercase;
      letter-spacing: 0.05em;
      margin-bottom: 4px;
    }
    .price {
      font-size: 2rem;
      font-weight: 800;
      color: var(--primary-dark);
      letter-spacing: -0.03em;
      line-height: 1.1;
    }
    .with-edges {
      font-size: 1rem;
      color: var(--muted);
      margin-top: 3px;
    }
    .result-meta {
      font-size: 1rem;
      color: var(--muted);
      margin-top: 10px;
      padding-top: 10px;
      border-top: 1px solid var(--primary-mid);
    }
    .result-meta div { margin-top: 2px; }
    .treatment {
      margin-top: 12px;
      padding: 10px 12px;
      background: var(--primary-pale);
      border: 1px solid var(--primary-mid);
      border-radius: var(--radius);
    }
    .treatment-title { font-weight: 700; font-size: 1rem; color: var(--primary-dark); }
    .treatment-price { font-size: 1.3rem; font-weight: 800; color: var(--primary-dark); margin-top: 2px; }
    .treatment-detail { font-size: 1rem; color: var(--muted); margin-top: 2px; }

    .result-disclaimer {
      font-size: 1rem;
      color: var(--faint);
      margin-top: 10px;
    }

    .fall-box {
      margin-top: 12px;
      padding: 10px 12px;
      border: 1px solid var(--primary-mid);
      border-radius: 10px;
      background: var(--primary-pale);
    }
    .fall-title { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 1rem; color: var(--primary-dark); margin-bottom: 8px; }
    .fall-title svg { color: var(--primary); flex: 0 0 auto; }
    .fall-rows { display: flex; flex-direction: column; gap: 5px; }
    .fall-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 1rem; color: var(--text); }
    .fall-row span:last-child { font-weight: 600; white-space: nowrap; }
    .fall-total { margin-top: 4px; padding-top: 7px; border-top: 1px solid var(--primary-mid); font-weight: 700; color: var(--primary-dark); }
    .fall-note { margin-top: 7px; font-size: 1rem; color: var(--muted); }

    .lead-form {
      margin-top: 12px;
      padding-top: 14px;
      border-top: 1px solid var(--border);
    }
    .lead-form-title {
      font-size: 1rem;
      font-weight: 700;
      margin-bottom: 4px;
    }
    .lead-form-sub {
      font-size: 1rem;
      color: var(--muted);
      margin-bottom: 10px;
    }

    .success {
      margin-top: 14px;
      padding: 14px;
      background: var(--primary-pale);
      border: 1px solid var(--primary-mid);
      border-radius: var(--radius);
      text-align: center;
    }
    .success-title {
      font-weight: 700;
      color: var(--primary-dark);
      font-size: 1rem;
      margin-bottom: 4px;
    }
    .success-sub {
      color: var(--muted);
      font-size: 1rem;
    }

    .credit {
      text-align: center;
      font-size: 1rem;
      color: var(--faint);
      margin-top: 10px;
    }
    .credit a { color: var(--faint); text-decoration: none; }
    .credit a:hover { text-decoration: underline; }

    /* Accessibility + form-standard helpers (added in the a11y pass). */
    .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; }
    .field-err { font-size: 1rem; color: #dc3545; margin-top: 4px; }
    .input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: #dc3545; box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.12); }
    .addr-strong { font-weight: 600; color: var(--text); }
    .btn-mt { margin-top: 8px; }
    .success-check { color: var(--primary); vertical-align: middle; margin-right: 4px; }
    /* >= 44px touch targets on phones (WCAG 2.5.5). */
    .input, .btn { min-height: 44px; }
    @media (max-width: 390px) {
      body { padding: 10px; }
      .widget { padding: 14px; }
      .scope-options { grid-template-columns: 1fr; }
      .scope-option { min-height: 46px; }
    }
