/* BuiltSure: a marketplace layout (search, job tiles, contractor rows, profiles).
   Blueprint blue + hard-hat yellow, white pages, one tinted band for the search. */
:root {
  --bg: #ffffff; --band: #eef2f7; --panel: #ffffff; --ink: #15202b; --muted: #5b6672; --line: #dfe4ea;
  --brand: #1d4e89; --brand-dark: #163c69; --on-brand: #ffffff; --chip: #eaf0f8; --hat: #f2b705;
  --head: "Work Sans", "Segoe UI", Arial, sans-serif;
  --body: "Source Sans 3", "Segoe UI", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11161c; --band: #18202a; --panel: #161d25; --ink: #e8edf3; --muted: #9ca8b5; --line: #2a3441;
    --brand: #7fb0ec; --brand-dark: #a9c9f2; --on-brand: #0d1621; --chip: #1f2a37; --hat: #f2b705;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 var(--body); }
a { color: var(--brand); }
a:focus-visible, .btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--hat); outline-offset: 2px; }
.wrap { max-width: 1120px; margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.narrow { max-width: 680px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
h1, h2, h3 { font-family: var(--head); line-height: 1.15; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .9rem; color: var(--muted); }

/* header */
.top { background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; }
.bar { display: flex; align-items: center; gap: 24px; min-height: 66px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font: 700 1.2rem var(--head); color: var(--ink); text-decoration: none; white-space: nowrap; }
.logo svg { color: var(--brand); }
.top nav { display: flex; gap: 22px; margin-left: auto; }
.top nav a { color: var(--ink); text-decoration: none; font-weight: 600; }
.top nav a[aria-current="page"] { color: var(--brand); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px;
  background: var(--brand); color: var(--on-brand); border: 2px solid var(--brand); border-radius: 8px;
  font: 600 1rem var(--body); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn.ghost { background: transparent; color: var(--brand); }
.btn.ghost:hover { background: var(--chip); }

/* home */
.hero { background: var(--band); border-bottom: 1px solid var(--line); padding-block: 56px 44px; }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); max-width: 17ch; text-wrap: balance; }
.sub { font-size: 1.15rem; color: var(--muted); max-width: 58ch; margin: 14px 0 26px; }
.search { display: grid; grid-template-columns: minmax(0, 1fr) 230px auto; gap: 10px; background: var(--panel);
  padding: 10px; border: 1px solid var(--line); border-radius: 12px; max-width: 860px; box-shadow: 0 6px 20px rgba(21, 32, 43, .07); }
.search input, .search select, .form input, .form select, .form textarea {
  font: 1rem var(--body); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; min-width: 0; }
.facts { margin: 14px 0 0; font-size: .95rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.block { padding-block: 44px; }
.block h2 { font-size: 1.6rem; margin-bottom: 18px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.group-h { margin-top: 34px; }
.group-note { margin: -10px 0 16px; }
.badge-joined { background: color-mix(in srgb, var(--hat) 35%, var(--chip)); font-weight: 600; }
.tile { display: grid; gap: 6px; padding: 18px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel);
  color: var(--ink); text-decoration: none; }
.tile svg { color: var(--brand); }
.tile:hover { border-color: var(--brand); }
.t-name { font-weight: 700; line-height: 1.25; }
.t-n { font-size: .9rem; color: var(--muted); }
.how ol { margin: 0 0 22px; padding-left: 22px; display: grid; gap: 10px; max-width: 62ch; }

.hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.latest { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.latest h2 { font-size: 1.05rem; margin-bottom: 8px; }
.latest ul { list-style: none; margin: 0; padding: 0; }
.latest li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 0 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.latest li:last-child { border-bottom: 0; }
.l-day { grid-row: span 2; font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; }
.l-what { font-weight: 600; }
.l-pro { font-size: .92rem; color: var(--muted); }
.l-pro a { color: var(--muted); }
.latest p { margin: 8px 0 0; font-size: .85rem; color: var(--muted); }

/* contractor rows */
.list { display: grid; gap: 12px; }
.pro { display: flex; justify-content: space-between; gap: 20px; padding: 18px 20px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--panel); }
.pro h3 { font-size: 1.15rem; }
.pro h3 a { color: var(--ink); text-decoration: none; }
.pro h3 a:hover { color: var(--brand); text-decoration: underline; }
.pro-main { min-width: 0; display: grid; gap: 6px; align-content: start; }
.pro-areas { color: var(--muted); font-size: .95rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: var(--chip); border-radius: 99px; padding: 2px 10px; font-size: .85rem; }
.pro-side { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
.count { display: flex; align-items: center; gap: 8px; }
.count b { font: 700 1.9rem/1 var(--head); color: var(--brand); font-variant-numeric: tabular-nums; }
.count span { font-size: .8rem; line-height: 1.25; color: var(--muted); }
.crumb { font-size: .9rem; color: var(--muted); margin: 0 0 10px; }
.page-h { font-size: clamp(1.8rem, 3.6vw, 2.4rem); margin-bottom: 10px; }
.cta-line { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 26px; padding: 18px 20px; border-radius: 10px; background: var(--band); font-weight: 600; }

/* profile */
.profile-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 22px; }
.profile-head .muted { max-width: 60ch; margin: 0; }
.profile-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.panel { border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; background: var(--panel); min-width: 0; }
.panel.wide { grid-column: 1 / -1; }
.panel h2 { font-size: 1.1rem; margin-bottom: 12px; }
.bar-row { display: grid; grid-template-columns: 170px minmax(0, 1fr) 36px; gap: 10px; align-items: center; margin-bottom: 8px; font-size: .95rem; }
.meter { height: 10px; background: var(--chip); border-radius: 99px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.bar-row b { text-align: right; font-variant-numeric: tabular-nums; }
.comms { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 20px; }
.comms li { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid var(--line); break-inside: avoid; }
.comms span { color: var(--muted); font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th { text-align: left; color: var(--muted); font-weight: 600; border-bottom: 2px solid var(--line); padding: 6px 8px 6px 0; }
td { padding: 8px 8px 8px 0; border-bottom: 1px solid var(--line); }
.claim { margin-top: 22px; padding: 14px 18px; border-left: 4px solid var(--hat); background: var(--band); border-radius: 0 8px 8px 0; }

/* ad landing pages */
.lp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; align-items: start; }
.lp-proof { margin: 18px 0 0; padding-left: 20px; display: grid; gap: 8px; }
.lp .form.panel { margin-top: 0; }
@media (max-width: 900px) { .lp-grid { grid-template-columns: minmax(0, 1fr); } }

/* forms */
.form { display: grid; gap: 6px; margin-top: 18px; }
.form label { font-weight: 600; margin-top: 10px; }
.form .btn { justify-self: start; margin-top: 14px; }
.hp { display: none; }

/* footer */
footer { margin-top: 30px; border-top: 1px solid var(--line); background: var(--band); padding-block: 30px; font-size: .9rem; color: var(--muted); }
footer p { max-width: 80ch; margin: 8px 0 0; }
.f-brand { font: 700 1.05rem var(--head); color: var(--ink); }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search { grid-template-columns: minmax(0, 1fr); }
  .pro { flex-direction: column; }
  .pro-side { justify-content: space-between; }
  .profile-grid { grid-template-columns: minmax(0, 1fr); }
  .bar-row { grid-template-columns: 120px minmax(0, 1fr) 30px; }
}
@media (max-width: 600px) {
  .top nav { display: none; }
  .bar { justify-content: space-between; }
  .comms { columns: 1; }
}
