:root {
    --bg:         #0b2c42;
    --surface:    rgba(255,255,255,0.07);
    --navy:       rgba(255,255,255,0.12);
    --navy-mid:   rgba(255,255,255,0.18);
    --cyan:       #00a8dd;
    --cyan-hover: #0091bf;
    --green:      #26d466;
    --text:       #e8f4fb;
    --muted:      rgba(255,255,255,0.45);
    --border:     rgba(255,255,255,0.14);
    --error:      #ff6b6b;
    --ff:         'Barlow', sans-serif;
    --ff-cond:    'Barlow Condensed', sans-serif;
  }

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

  body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--ff);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
  }

  /* ── Layout ── */
  .main {
    max-width: 660px;
    margin: 0 auto;
    padding: 40px 24px 60px;
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  /* ── Page intro ── */
  .page-intro { margin-bottom: 40px; }
  .page-intro-label {
    font-family: var(--ff-cond);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--cyan);
    margin-bottom: 8px;
  }
  .page-intro-title {
    font-family: var(--ff-cond);
    font-size: 32px;
    font-weight: 700;
    line-height: 1.1;
    color: #ffffff;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
  }
  .page-intro-sub {
    font-size: 15px;
    font-weight: 300;
    color: var(--muted);
    line-height: 1.6;
    max-width: 480px;
  }

  /* ── Step sections ── */
  .step {
    display: flex;
    gap: 24px;
    margin-bottom: 40px;
  }
  .step-aside {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 2px;
  }
  .step-num {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--cyan);
    color: #fff;
    font-family: var(--ff-cond);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  .step-line {
    width: 1px;
    flex: 1;
    background: var(--border);
    margin-top: 8px;
    min-height: 20px;
  }
  .step-content { flex: 1; min-width: 0; }
  .step-header { margin-bottom: 16px; }
  .step-title {
    font-family: var(--ff-cond);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #ffffff;
    line-height: 1.2;
  }
  .step-badge {
    font-family: var(--ff-cond);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 2px;
  }

  /* ── Surface area input ── */
  .sqm-wrapper {
    display: inline-flex;
    align-items: stretch;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    transition: border-color 0.15s;
  }
  .sqm-wrapper:focus-within { border-color: var(--cyan); }
  .sqm-input {
    width: 140px;
    background: transparent;
    border: none;
    color: #ffffff;
    font-family: var(--ff-cond);
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.02em;
    padding: 12px 16px;
    outline: none;
  }
  .sqm-input::placeholder { color: rgba(255,255,255,0.25); }
  .sqm-input::-webkit-inner-spin-button,
  .sqm-input::-webkit-outer-spin-button { opacity: 0; }
  .sqm-unit {
    background: var(--cyan);
    color: #fff;
    font-family: var(--ff-cond);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0 18px;
    display: flex;
    align-items: center;
  }
  .sqm-hint { font-size: 13px; font-weight: 300; color: var(--muted); margin-top: 10px; }

  /* ── Option cards ── */
  .options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
  }
  .opt-card { position: relative; cursor: pointer; height: 100%; }
  .opt-card input { position: absolute; opacity: 0; pointer-events: none; }

  .opt-label {
    display: flex;
    flex-direction: column;
    padding: 14px 14px 12px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 4px;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    user-select: none;
    min-height: 56px;
    height: 100%;
  }
  .opt-card input:checked + .opt-label {
    background: var(--navy);
    border-color: var(--navy);
    box-shadow: 0 4px 16px rgba(12,29,44,0.18);
  }
  .opt-label:hover {
    border-color: var(--navy-mid);
    box-shadow: 0 2px 8px rgba(12,29,44,0.08);
  }
  .opt-card input:checked + .opt-label:hover { background: #1a3347; }

  .opt-name {
    font-family: var(--ff-cond);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.3;
    color: #ffffff;
    padding-right: 24px;
    transition: color 0.15s;
  }
  .opt-card input:checked + .opt-label .opt-name { color: #fff; }

  .opt-check {
    width: 14px; height: 14px;
    border: 1.5px solid var(--border);
    border-radius: 2px;
    display: flex; align-items: center; justify-content: center;
    position: absolute; top: 14px; right: 14px;
    transition: background 0.15s, border-color 0.15s;
    background: transparent;
  }
  .opt-check.radio { border-radius: 50%; }
  .opt-card input:checked + .opt-label .opt-check {
    background: var(--green);
    border-color: var(--green);
  }
  .opt-check svg { width: 8px; height: 8px; color: #fff; opacity: 0; transition: opacity 0.1s; }
  .opt-card input:checked + .opt-label .opt-check svg { opacity: 1; }

  .opt-desc {
    font-size: 12px;
    font-weight: 300;
    color: var(--muted);
    line-height: 1.5;
    margin-top: 6px;
    padding-right: 20px;
    transition: color 0.15s;
  }
  .opt-card input:checked + .opt-label .opt-desc { color: rgba(255,255,255,0.65); }

  /* ── Total display ── */
  .total-block {
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    margin-bottom: 40px;
    overflow: hidden;
  }
  .total-inner {
    padding: 28px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
  }
  .total-labels { display: flex; flex-direction: column; gap: 8px; }
  .total-excl { display: flex; align-items: baseline; gap: 12px; }
  .total-excl .label {
    font-family: var(--ff-cond);
    font-size: 12px; font-weight: 600;
    letter-spacing: 0.1em; text-transform: uppercase;
    color: rgba(255,255,255,0.6); white-space: nowrap;
  }
  .total-excl .amount { font-family: var(--ff-cond); font-size: 48px; font-weight: 700; color: #fff; letter-spacing: -0.02em; line-height: 1; }
  .total-incl { display: flex; align-items: baseline; gap: 12px; }
  .total-incl .label {
    font-size: 12px; font-weight: 300;
    letter-spacing: 0.06em; text-transform: uppercase;
    color: rgba(255,255,255,0.45); white-space: nowrap;
  }
  .total-incl .amount {
    font-size: 16px; font-weight: 500;
    color: rgba(255,255,255,0.7);
    letter-spacing: 0;
  }
  .gst-tag {
    font-family: var(--ff-cond);
    font-size: 12px; font-weight: 600;
    letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--cyan);
    border: 1px solid rgba(0,168,221,0.35);
    padding: 5px 12px;
    border-radius: 3px;
    align-self: center; white-space: nowrap;
  }
  .total-footer {
    padding: 12px 32px;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 12px; font-weight: 300;
    color: rgba(255,255,255,0.35);
    line-height: 1.6;
  }
  .empty-state {
    padding: 32px;
    text-align: center;
    color: rgba(255,255,255,0.4);
    font-size: 14px; font-weight: 300;
    letter-spacing: 0.02em;
  }

  @keyframes pop { 0%,100%{transform:scale(1)} 50%{transform:scale(1.015)} }
  .pop { animation: pop 0.2s ease; }

  /* ── Form fields ── */
  .field-row {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 16px; margin-bottom: 20px;
  }
  @media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }

  .field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 20px; }
  .field:last-child { margin-bottom: 0; }

  .field label {
    font-family: var(--ff-cond);
    font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.12em;
    color: rgba(255,255,255,0.75);
  }
  .field label .optional {
    font-family: var(--ff);
    font-weight: 300; text-transform: none;
    letter-spacing: 0; color: var(--muted); font-size: 12px;
  }
  .field input[type="text"],
  .field input[type="email"],
  .field textarea {
    background: rgba(255,255,255,0.08);
    border: 1.5px solid var(--border);
    border-radius: 4px;
    color: #ffffff;
    font-family: var(--ff);
    font-size: 15px; font-weight: 400;
    padding: 11px 14px;
    outline: none;
    transition: border-color 0.15s;
    width: 100%;
  }
  .field input::placeholder, .field textarea::placeholder { color: rgba(255,255,255,0.3); }
  .field input:focus, .field textarea:focus { border-color: var(--cyan); }
  .field textarea { height: auto; min-height: 110px; resize: vertical; }

  /* ── Drop zone ── */
  .dropzone {
    border: 1.5px dashed var(--border);
    border-radius: 4px;
    background: rgba(255,255,255,0.05);
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    position: relative;
  }
  .dropzone:hover, .dropzone.dragover {
    border-color: var(--cyan);
    background: rgba(255,255,255,0.08);
  }
  .dropzone input[type="file"] {
    position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
  }
  .dropzone-icon {
    width: 36px; height: 36px;
    margin: 0 auto 10px;
    display: flex; align-items: center; justify-content: center;
    background: var(--cyan);
    border-radius: 50%;
  }
  .dropzone-icon svg { width: 16px; height: 16px; color: #fff; }
  .dropzone-title {
    font-family: var(--ff-cond);
    font-size: 13px; font-weight: 600;
    letter-spacing: 0.06em; text-transform: uppercase;
    color: rgba(255,255,255,0.85);
  }
  .dropzone-sub { font-size: 12px; font-weight: 300; color: var(--muted); margin-top: 4px; }

  /* ── File pills ── */
  .file-list { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
  .file-pill {
    display: flex; align-items: center; gap: 10px;
    background: rgba(255,255,255,0.07);
    border: 1.5px solid var(--border);
    border-radius: 4px;
    padding: 8px 12px;
  }
  .file-pill-icon { color: var(--muted); flex-shrink: 0; }
  .file-pill-icon svg { width: 14px; height: 14px; display: block; }
  .file-pill-name { font-size: 13px; color: rgba(255,255,255,0.9); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .file-pill-size { font-size: 12px; font-weight: 300; color: var(--muted); flex-shrink: 0; }
  .file-pill-status {
    font-family: var(--ff-cond);
    font-size: 11px; font-weight: 600; flex-shrink: 0;
    letter-spacing: 0.06em; text-transform: uppercase;
  }
  .file-pill-status.uploading { color: var(--cyan); }
  .file-pill-status.done      { color: #00bb55; }
  .file-pill-status.failed    { color: var(--error); }
  .file-pill-remove {
    background: none; border: none; color: var(--muted);
    cursor: pointer; padding: 0; line-height: 1;
    font-size: 18px; flex-shrink: 0; transition: color 0.12s;
  }
  .file-pill-remove:hover { color: var(--error); }

  /* ── Estimate ID ── */
  .estimate-id-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255,255,255,0.05);
    border: 1.5px solid var(--border);
    border-radius: 4px;
    margin-top: 24px;
  }
  .estimate-id-label {
    font-family: var(--ff-cond);
    font-size: 11px; font-weight: 600;
    letter-spacing: 0.12em; text-transform: uppercase;
    color: rgba(255,255,255,0.45);
  }
  .estimate-id {
    font-family: var(--ff-cond);
    font-size: 15px; font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--green);
  }

  /* ── Submit ── */
  .submit-btn {
    width: 100%; margin-top: 24px;
    background: var(--cyan);
    color: #fff;
    border: none; border-radius: 4px;
    font-family: var(--ff-cond);
    font-size: 14px; font-weight: 700;
    letter-spacing: 0.12em; text-transform: uppercase;
    padding: 16px 32px;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
  }
  .submit-btn:hover:not(:disabled) { background: var(--cyan-hover); transform: translateY(-1px); }
  .submit-btn:active:not(:disabled) { transform: translateY(0); }
  .submit-btn:disabled {
    background: transparent;
    color: rgba(255,255,255,0.35);
    border: 1.5px solid rgba(255,255,255,0.25);
    cursor: not-allowed; transform: none;
  }
  .form-note {
    font-size: 12px; font-weight: 300;
    color: var(--muted);
    text-align: center; margin-top: 10px; line-height: 1.5;
  }

  /* ── Success ── */
  .success-state {
    display: none;
    padding: 60px 32px;
    text-align: center;
  }
  .success-icon {
    width: 56px; height: 56px;
    background: var(--cyan);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px;
  }
  .success-icon svg { width: 24px; height: 24px; color: #ffffff; }
  .success-title {
    font-family: var(--ff-cond);
    font-size: 22px; font-weight: 700;
    letter-spacing: 0.04em; text-transform: uppercase;
    color: #ffffff; margin-bottom: 10px;
  }
  .success-msg {
    font-size: 15px; font-weight: 300;
    color: var(--muted); line-height: 1.7;
    max-width: 400px; margin: 0 auto;
  }
