:root {
  --navy: #122e45;
  --cream: #f9f8ee;
  --gold: #e1b661;
  --teal: #2292a4;
  --teal-text: #17707f;
  --ink: #1b2733;
  --muted: #475663;
  --line: #dcdac9;
  --card: #ffffff;
  --radius: 20px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: Nunito, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  overflow-wrap: break-word;
}
img { max-width: 100%; }
h1, h2, h3 {
  margin: 0 0 0.75rem;
  color: var(--navy);
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
h1 { font-size: clamp(1.75rem, 1.2rem + 2.6vw, 2.75rem); }
h2 { font-size: clamp(1.375rem, 1.1rem + 1.2vw, 1.75rem); }
h3 { font-size: 1.1875rem; }
p { margin: 0 0 1rem; }
a { color: var(--teal-text); text-underline-offset: 3px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.wrap { width: min(100% - 2rem, 68rem); margin-inline: auto; }

.skip-link {
  position: absolute; left: 1rem; top: 0; z-index: 10;
  transform: translateY(-200%);
  background: var(--gold); color: var(--navy); font-weight: 800;
  padding: 0.6rem 1rem; border-radius: 0 0 12px 12px;
}
.skip-link:focus { transform: none; }

/* header */
.site-header { background: var(--navy); color: var(--cream); }
.header-inner {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 0.25rem 1.5rem;
  padding-block: 0.75rem;
}
.brand {
  flex: 1 1 100%; min-width: 0;
  display: flex; flex-direction: column; justify-content: center;
  min-height: 2.75rem; text-decoration: none; color: var(--cream);
}
.brand-name { font-weight: 800; font-size: 1.25rem; line-height: 1.2; }
.brand-by { font-size: 0.8125rem; line-height: 1.3; color: #c5d3de; }
.nav { display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; margin-left: -0.75rem; }
.nav a {
  display: inline-flex; align-items: center; min-height: 2.75rem;
  padding: 0 0.75rem; border-radius: 999px;
  color: var(--cream); font-weight: 700; text-decoration: none;
}
.nav a:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
@media (min-width: 640px) {
  .brand { flex: 0 1 auto; }
  .nav { margin-left: 0; }
}

/* layout */
.main { flex: 1 0 auto; padding-block: 1.75rem 3rem; display: grid; gap: 1.5rem; align-content: start; }
.main > * { min-width: 0; }
.page-head { margin-bottom: 0.25rem; }
.lead { font-size: 1.125rem; color: var(--muted); max-width: 42rem; }
.updated { display: inline-block; font-size: 0.9375rem; font-weight: 700; }
.section-title { margin-top: 1rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.75rem; }
.section-sub { font-size: 1rem; font-weight: 600; color: var(--muted); }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.25rem;
  box-shadow: 0 2px 10px rgba(18, 46, 69, 0.06);
  min-width: 0;
}
@media (min-width: 640px) { .card { padding: 1.75rem; } }
.empty { text-align: center; }
.empty p { color: var(--muted); max-width: 32rem; margin-inline: auto; }
.empty .btn { margin-top: 0.5rem; }

/* footer */
.site-footer { background: var(--navy); color: var(--cream); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 0 1.5rem; padding-block: 1rem; }
.footer-inner a {
  display: inline-flex; align-items: center; min-height: 2.75rem;
  color: var(--cream); font-weight: 600;
}
.footer-inner a:hover { color: #fff; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: 0.5rem 1.5rem; border: 2px solid var(--gold);
  border-radius: 999px; background: var(--gold); color: var(--navy);
  font: inherit; font-weight: 800; text-decoration: none; text-align: center;
  cursor: pointer; line-height: 1.2;
}
.btn:hover { background: #d4a64a; border-color: #d4a64a; color: var(--navy); }
.btn:disabled { opacity: 0.65; cursor: not-allowed; }
.btn-ghost { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn-ghost:hover { background: var(--navy); border-color: var(--navy); color: var(--cream); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }
.btn-row.left { justify-content: flex-start; }

/* partner profile */
.profile { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.profile-text { flex: 1 1 14rem; min-width: 0; }
.logo {
  flex: none; width: 4rem; height: 4rem; border-radius: 16px;
  background: #fff; border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
}
.logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.logo-lg { width: 5rem; height: 5rem; border-radius: 20px; }
.logo-initials {
  background: var(--navy); border-color: var(--navy); color: var(--cream);
  font-weight: 800; font-size: 1.375rem; letter-spacing: 0.02em;
}
.logo-lg.logo-initials { font-size: 1.75rem; }
.meta { list-style: none; margin: 0 0 0.5rem; padding: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; }
.chip {
  display: inline-block; padding: 0.2rem 0.85rem; border-radius: 999px;
  background: #f4e6c4; color: #4a350a; font-weight: 700; font-size: 0.9375rem;
  overflow-wrap: anywhere; max-width: 100%;
}
.area { color: var(--muted); overflow-wrap: anywhere; min-width: 0; }
.area-label { font-weight: 800; color: var(--navy); }
.site-link {
  display: inline-flex; align-items: center; min-height: 2.75rem;
  font-weight: 700; overflow-wrap: anywhere; max-width: 100%;
}

/* forms */
.form { display: grid; gap: 1.25rem; margin-top: 1.25rem; }
.field { min-width: 0; }
.field label { display: block; margin-bottom: 0.4rem; font-weight: 700; color: var(--navy); }
.optional { font-weight: 600; color: var(--muted); }
input[type="text"], input[type="tel"], input[type="email"], input[type="search"], textarea {
  display: block; width: 100%; min-height: 3rem; padding: 0.65rem 0.9rem;
  font: inherit; font-size: 1rem; color: var(--ink); background: #fff;
  border: 2px solid #aeb8c0; border-radius: 14px;
}
textarea { resize: vertical; min-height: 7rem; line-height: 1.5; }
input:focus, textarea:focus { outline: 3px solid var(--teal); outline-offset: 1px; border-color: var(--teal-text); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #a32424; }
.hint { margin: 0.4rem 0 0; font-size: 0.9375rem; color: var(--muted); }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.check {
  display: flex; align-items: flex-start; gap: 0.75rem; min-height: 2.75rem;
  padding: 0.75rem 0.9rem; border-radius: 14px; background: var(--cream);
  border: 1px solid var(--line); cursor: pointer; font-weight: 600;
}
.check input { flex: none; width: 1.5rem; height: 1.5rem; margin: 0.1rem 0 0; accent-color: var(--navy); }
.check span { min-width: 0; }
.form .btn { width: 100%; }
@media (min-width: 640px) { .form .btn { width: auto; justify-self: start; min-width: 14rem; } }

/* notices */
.notice { padding: 0.9rem 1.1rem; border-radius: 14px; border: 1px solid; font-weight: 600; overflow-wrap: anywhere; }
.notice[hidden] { display: none; }
.notice-success { background: #e1f3e6; border-color: #8fc9a0; color: #11502a; }
.notice-error { background: #fbe4e2; border-color: #e0a09b; color: #7a1d17; }
.notice-info { background: #e6eef4; border-color: #b4c6d4; color: var(--navy); }

/* directory */
.filter { max-width: 32rem; }
.filter label { display: block; font-weight: 700; color: var(--navy); margin-bottom: 0.4rem; }
.trade-group[hidden], .dir-grid li[hidden], .filter[hidden], #dir-none[hidden] { display: none; }
.trade-title { margin-top: 0.5rem; padding-bottom: 0.4rem; border-bottom: 3px solid var(--gold); display: inline-block; max-width: 100%; }
.dir-grid {
  list-style: none; margin: 1rem 0 0; padding: 0;
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
}
.dir-grid li { min-width: 0; display: flex; }
.dir-card {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 1rem;
  padding: 1rem; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); text-decoration: none; color: var(--ink);
  box-shadow: 0 2px 10px rgba(18, 46, 69, 0.06);
}
.dir-card:hover { border-color: var(--teal); box-shadow: 0 4px 16px rgba(18, 46, 69, 0.12); color: var(--ink); }
.dir-text { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.dir-name { font-weight: 800; color: var(--navy); font-size: 1.125rem; line-height: 1.3; overflow-wrap: anywhere; }
.dir-area { color: var(--muted); font-size: 0.9375rem; line-height: 1.45; overflow-wrap: anywhere; }

/* leaderboard */
.lb { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 1rem; }
.lb-row {
  display: grid; grid-template-columns: 2.75rem minmax(0, 1fr);
  gap: 0.75rem 1rem; align-items: start; padding: 1rem;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: 0 2px 10px rgba(18, 46, 69, 0.06);
}
.lb-rank {
  width: 2.75rem; height: 2.75rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--cream); border: 1px solid var(--line);
  color: var(--navy); font-weight: 800;
}
.lb-top .lb-rank { background: var(--gold); border-color: var(--gold); }
.lb-who { min-width: 0; }
.lb-name {
  display: block; font-weight: 800; font-size: 1.125rem; line-height: 1.3;
  color: var(--navy); overflow-wrap: anywhere; padding-block: 0.25rem; min-height: 2.5rem;
}
.lb-trade { display: block; color: var(--muted); font-size: 0.9375rem; overflow-wrap: anywhere; }
.lb-stats {
  grid-column: 1 / -1; margin: 0.25rem 0 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem;
}
.lb-stat { background: var(--cream); border-radius: 14px; padding: 0.5rem 0.25rem; text-align: center; min-width: 0; }
.lb-stat dt { font-size: 0.8125rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.lb-stat dd { margin: 0; font-size: 1.375rem; font-weight: 800; color: var(--navy); line-height: 1.3; }
@media (min-width: 720px) {
  .lb-row { grid-template-columns: 3rem minmax(0, 1fr) auto; align-items: center; padding: 1rem 1.25rem; column-gap: 1.25rem; }
  .lb-stats { grid-column: auto; margin: 0; grid-template-columns: repeat(3, 6.25rem); }
}

/* dashboard */
.stack { display: grid; gap: 1rem; margin-top: 1rem; }
.ref-head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0.5rem 1rem; margin-bottom: 0.75rem; }
.ref-head h3 { flex: 1 1 12rem; min-width: 0; margin: 0; }
.pill {
  flex: none; display: inline-block; padding: 0.2rem 0.85rem; border-radius: 999px;
  font-weight: 800; font-size: 0.875rem; line-height: 1.5; border: 1px solid transparent;
}
.pill-sent { background: #e6eef4; color: var(--navy); border-color: #b4c6d4; }
.pill-contacted { background: #d6eef2; color: #0d4a56; border-color: #9cd0d9; }
.pill-quoted { background: #f6e7c4; color: #55400f; border-color: #e1c27d; }
.pill-won { background: #d8efe0; color: #11502a; border-color: #8fc9a0; }
.pill-lost { background: #f3dada; color: #7a1d17; border-color: #dba5a2; }
.facts { margin: 0 0 1rem; display: grid; gap: 0.75rem; }
.facts > div { min-width: 0; }
.facts dt { font-size: 0.8125rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.facts a { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 700; max-width: 100%; }
@media (min-width: 720px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem 1.5rem; } .facts .wide { grid-column: 1 / -1; } }
.stage-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.stage-btn {
  flex: 1 1 calc(50% - 0.5rem); min-width: 0; min-height: 2.75rem;
  padding: 0.4rem 0.75rem; border-radius: 999px; font: inherit; font-weight: 800;
  background: #fff; color: var(--navy); border: 2px solid var(--navy); cursor: pointer;
}
.stage-btn:hover:not(:disabled) { background: var(--navy); color: var(--cream); }
.stage-btn:disabled { background: var(--navy); color: var(--cream); cursor: default; opacity: 1; }
.stage-row.busy .stage-btn { opacity: 0.6; cursor: wait; }
@media (min-width: 640px) { .stage-btn { flex: 0 1 8rem; } }
.card-msg { margin-top: 0.75rem; }
.sent-meta { color: var(--muted); font-size: 0.9375rem; margin: 0; }
.dash-head { margin-bottom: 0.5rem; }
.dash-links { display: flex; flex-wrap: wrap; gap: 0 1.25rem; }
.dash-links a { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 700; }
.tip { color: var(--muted); font-size: 0.9375rem; }

/* landing */
.hero { padding-block: 0.5rem; }
.hero h1 { max-width: 40rem; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.step-num {
  display: grid; place-items: center; width: 2.5rem; height: 2.5rem; margin-bottom: 0.75rem;
  border-radius: 50%; background: var(--gold); color: var(--navy); font-weight: 800;
}
.cta-card { background: var(--navy); border-color: var(--navy); color: var(--cream); }
.cta-card h2 { color: var(--cream); }
.cta-card p { color: #dbe5ec; }
.cta-card .btn-ghost { border-color: var(--cream); color: var(--cream); }
.cta-card .btn-ghost:hover { background: var(--cream); color: var(--navy); }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
