:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-soft: #f2f6fb;
  --text: #172033;
  --muted: #667085;
  --border: #dbe3ef;
  --blue: #1769e8;
  --blue-dark: #1154bd;
  --green: #1b7f3a;
  --green-bg: #e8f7ec;
  --amber: #a55e00;
  --amber-bg: #fff2d6;
  --shadow: 0 18px 45px rgba(20, 34, 62, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: 72px;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.brand {
  color: var(--text);
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.brand span {
  color: var(--blue);
}

.brand small {
  font-size: 20px;
}

.nav {
  display: flex;
  align-self: stretch;
  gap: 18px;
}

.nav a {
  display: flex;
  align-items: center;
  padding: 0 10px;
  color: #20293c;
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
  border-bottom: 3px solid transparent;
}

.nav a.active {
  color: var(--blue);
  border-color: var(--blue);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.pilot-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  color: var(--green);
  background: var(--green-bg);
  border: 1px solid #bfe7c9;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.location-button,
.profile-button,
.icon-button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  font-weight: 600;
}

.location-button,
.profile-button {
  padding: 0 12px;
}

.icon-button {
  width: 40px;
  background: var(--surface-soft);
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(340px, 520px) minmax(0, 1fr);
  gap: 32px;
  width: min(1480px, calc(100% - 48px));
  margin: 26px auto 36px;
}

.search-pane h1 {
  margin: 0 0 10px;
  font-size: clamp(34px, 4vw, 44px);
  line-height: 1.08;
}

.lead-copy {
  max-width: 60ch;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0 0 18px;
}

.trust-strip div {
  display: grid;
  gap: 4px;
  min-height: 86px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.trust-strip strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.25;
}

.trust-strip span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 18px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.mode {
  min-height: 48px;
  border: 0;
  background: transparent;
  color: #344054;
  font-weight: 750;
}

.mode.active {
  background: var(--blue);
  color: #fff;
}

.form-card,
.mini-section,
.bonus-panel,
.results-pane,
.legend {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.form-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.hidden {
  display: none;
}

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

label {
  color: #20293c;
  font-size: 14px;
  font-weight: 750;
}

input,
select {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(23, 105, 232, 0.12);
}

.budget-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.primary-button,
.secondary-button {
  min-height: 46px;
  border-radius: var(--radius);
  font-weight: 800;
}

.primary-button {
  color: #fff;
  background: var(--blue);
  border: 1px solid var(--blue);
}

.primary-button:hover {
  background: var(--blue-dark);
}

.secondary-button {
  color: var(--blue);
  background: #fff;
  border: 1px solid var(--border);
}

.full {
  width: 100%;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.check-row input {
  width: 18px;
  min-height: 18px;
  margin-top: 2px;
}

.mini-section {
  margin-top: 24px;
  padding: 16px;
  box-shadow: none;
}

.bonus-panel {
  margin-top: 24px;
  padding: 16px;
  box-shadow: none;
}

.bonus-note {
  display: grid;
  gap: 4px;
  padding: 12px;
  color: #24411f;
  background: var(--green-bg);
  border: 1px solid #bfe7c9;
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.4;
}

.bonus-note span {
  color: #376b42;
}

.section-heading,
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-heading h2,
.results-header h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.section-heading button {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 14px;
  font-weight: 700;
}

.request-list,
.tip-list,
.bonus-list,
.result-list {
  display: grid;
}

.request-row,
.tip-row,
.bonus-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}

.request-row:last-child,
.tip-row:last-child,
.bonus-row:last-child {
  border-bottom: 0;
}

.bonus-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 14px 0 4px;
}

.bonus-metrics div {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.bonus-metrics span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.bonus-metrics strong {
  font-size: 22px;
}

.row-title {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 750;
}

.row-meta {
  color: var(--muted);
  font-size: 13px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.status-chip.verified,
.status-chip.trusted {
  color: var(--green);
  background: var(--green-bg);
  border: 1px solid #bfe7c9;
}

.status-chip.pending {
  color: var(--amber);
  background: var(--amber-bg);
  border: 1px solid #ffd28a;
}

.status-chip.ready {
  color: var(--blue);
  background: #eaf2ff;
  border: 1px solid #bdd5ff;
}

.results-pane {
  overflow: hidden;
  align-self: start;
}

.results-header {
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
}

.results-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.results-header select {
  width: auto;
  min-width: 178px;
}

.result-card {
  display: grid;
  grid-template-columns: 58px minmax(180px, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  min-height: 122px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}

.avatar {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  color: #fff;
  background: linear-gradient(145deg, #1769e8, #1b7f3a);
  border-radius: 50%;
  font-size: 20px;
  font-weight: 850;
}

.result-name {
  margin: 0 0 5px;
  font-size: 20px;
  line-height: 1.15;
}

.result-trade {
  margin: 0 0 8px;
  color: var(--muted);
}

.rating {
  color: var(--muted);
  font-size: 14px;
}

.rating strong {
  color: #f0a500;
}

.verification-note {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
}

.result-actions {
  display: flex;
  gap: 8px;
}

.small-button {
  min-height: 40px;
  padding: 0 13px;
  color: #1d2939;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-weight: 750;
  white-space: nowrap;
}

.legend {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 10px;
  padding: 16px;
  box-shadow: none;
}

.legend div {
  display: grid;
  grid-template-columns: 42px 1fr;
  column-gap: 12px;
  align-items: center;
}

.legend p {
  grid-column: 2;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.legend-icon {
  display: grid;
  grid-row: span 2;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-weight: 900;
}

.legend-icon.verified,
.legend-icon.trusted {
  color: var(--green);
  background: var(--green-bg);
}

.legend-icon.pending {
  color: var(--amber);
  background: var(--amber-bg);
}

dialog {
  width: min(440px, calc(100% - 32px));
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(15, 23, 42, 0.34);
}

dialog form {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 24px;
}

.dialog-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: var(--radius);
  background: var(--surface-soft);
  font-size: 22px;
}

dialog h2 {
  margin: 0;
}

dialog p {
  margin: 0;
  color: var(--muted);
}

.contact-box {
  display: grid;
  gap: 4px;
  padding: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.contact-box span,
.dialog-note {
  color: var(--muted);
  font-size: 14px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10;
  display: none;
  max-width: min(420px, calc(100% - 36px));
  padding: 14px 16px;
  color: #24411f;
  background: #fff;
  border: 1px solid #bfe7c9;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 14px;
  line-height: 1.45;
}

.toast.visible {
  display: block;
}

.site-footer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  width: min(1480px, calc(100% - 48px));
  margin: 0 auto 34px;
  padding: 22px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.site-footer strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
}

.site-footer p {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
}

.site-footer a {
  color: var(--blue);
  font-weight: 750;
}

.content-page {
  width: min(860px, calc(100% - 48px));
  margin: 42px auto;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.content-page h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 46px);
  line-height: 1.08;
}

.content-page h2 {
  margin: 28px 0 8px;
  font-size: 22px;
}

.content-page p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

@media (max-width: 1100px) {
  .nav {
    display: none;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar {
    min-height: auto;
    flex-wrap: wrap;
    gap: 14px;
    padding: 16px;
  }

  .top-actions {
    width: 100%;
    margin-left: 0;
  }

  .profile-button {
    margin-left: auto;
  }

  .app-shell {
    width: min(100% - 24px, 680px);
    margin-top: 18px;
  }

  .site-footer {
    grid-template-columns: 1fr;
    width: min(100% - 24px, 680px);
  }

  .budget-row,
  .actions-row,
  .bonus-metrics,
  .trust-strip,
  .legend {
    grid-template-columns: 1fr;
  }

  .result-card {
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: start;
  }

  .avatar {
    width: 48px;
    height: 48px;
    font-size: 17px;
  }

  .result-status,
  .result-actions {
    grid-column: 2;
  }

  .result-actions {
    flex-wrap: wrap;
  }

  .results-header {
    align-items: stretch;
    flex-direction: column;
  }

  .results-header select {
    width: 100%;
  }
}
