:root {
  --ink: #17211b;
  --muted: #718078;
  --line: #dfe6e1;
  --soft: #f3f6f3;
  --paper: #fbfcfa;
  --green: #1f6b43;
  --green-dark: #164d32;
  --lime: #bfe36a;
  --warm: #f0a951;
  --red: #a34a3d;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input, select { font: inherit; }
button, select { cursor: pointer; }
a { color: inherit; }

.app-shell { min-height: 100vh; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 64px);
  background: rgba(251, 252, 250, .9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(23, 33, 27, .08);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 800; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 11px; background: var(--ink); color: white; font-size: 12px; letter-spacing: -.04em; }
.topbar-actions { display: flex; align-items: center; gap: 22px; }
.sync-status { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 7px; }
.sync-status i { width: 7px; height: 7px; border-radius: 50%; background: #5aae72; box-shadow: 0 0 0 4px #e7f5eb; }
.header-cta, .find-more button, .modal-submit {
  border: 0;
  border-radius: 12px;
  padding: 11px 18px;
  background: var(--ink);
  color: white;
  font-weight: 750;
  transition: transform .18s ease, background .18s ease;
}
.header-cta:hover, .find-more button:hover, .modal-submit:hover { background: var(--green-dark); transform: translateY(-1px); }

.hero {
  margin: 0 auto;
  max-width: 1440px;
  padding: 70px clamp(20px, 4vw, 64px) 42px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
}
.eyebrow { margin: 0 0 12px; color: var(--green); font-size: 12px; line-height: 1; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.hero h1 { max-width: 760px; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(46px, 6vw, 82px); line-height: .98; font-weight: 500; letter-spacing: -.055em; }
.hero-copy { max-width: 680px; margin: 24px 0 0; color: var(--muted); font-size: 18px; line-height: 1.55; }
.hero-score { flex: 0 0 auto; width: 140px; height: 140px; padding: 22px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--lime); box-shadow: 0 18px 45px rgba(91, 118, 49, .16); }
.hero-score span, .hero-score small { font-size: 11px; font-weight: 750; }
.hero-score strong { font-size: 45px; line-height: 1; letter-spacing: -.06em; }

.analytics {
  max-width: 1312px;
  margin: 0 auto 60px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  background: white;
  box-shadow: 0 18px 60px rgba(33, 51, 41, .06);
}
.metric { min-width: 0; padding: 24px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric-primary { background: #eff8f0; }
.metric-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.metric-head span { color: var(--muted); font-size: 13px; font-weight: 700; }
.metric-head b { font-size: 30px; letter-spacing: -.045em; }
.wide-progress { height: 6px; margin: 20px 0 13px; overflow: hidden; border-radius: 999px; background: #e5ebe6; }
.wide-progress i { display: block; height: 100%; min-width: 2px; border-radius: inherit; background: var(--green); transition: width .35s ease; }
.metric p { margin: 0; color: var(--muted); font-size: 12px; }

.workspace { padding: 0 clamp(20px, 4vw, 64px) 70px; max-width: 1440px; margin: 0 auto; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; }
.section-heading h2, .find-more h2, .modal h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 36px; line-height: 1; font-weight: 500; letter-spacing: -.035em; }
.result-count { color: var(--muted); font-size: 13px; }
.toolbar { display: grid; grid-template-columns: minmax(260px, 1fr) 250px; gap: 12px; margin-bottom: 14px; }
.search-box { display: flex; align-items: center; gap: 10px; padding: 0 15px; border: 1px solid var(--line); border-radius: 13px; background: white; color: var(--muted); }
.search-box input { width: 100%; height: 46px; border: 0; outline: 0; background: transparent; color: var(--ink); }
.toolbar > select, .status-row select, .modal select, .modal input { border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--ink); outline: none; }
.toolbar > select { padding: 0 14px; }
.tabs { display: flex; gap: 7px; padding: 6px; margin-bottom: 24px; overflow-x: auto; border-radius: 14px; background: #edf1ed; }
.tabs button { white-space: nowrap; border: 0; border-radius: 10px; padding: 9px 12px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 700; }
.tabs button span { display: inline-grid; place-items: center; min-width: 21px; height: 21px; margin-left: 7px; padding: 0 5px; border-radius: 6px; background: rgba(23, 33, 27, .08); font-size: 11px; }
.tabs button.active { background: white; color: var(--ink); box-shadow: 0 3px 12px rgba(24, 39, 30, .08); }

.client-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.client-card { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 20px; background: white; box-shadow: 0 10px 35px rgba(33, 51, 41, .04); transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease; }
.client-card:hover { transform: translateY(-3px); box-shadow: 0 18px 45px rgba(33, 51, 41, .09); }
.client-card.rejected { opacity: .58; background: #f6f4f2; }
.card-topline { display: flex; justify-content: space-between; align-items: center; }
.priority { padding: 6px 9px; border-radius: 7px; font-size: 10px; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.priority-A { background: #e7f3d2; color: #45641b; }
.priority-B { background: #fff0da; color: #8b5a1b; }
.priority-C { background: #f2eeee; color: #755e5a; }
.lead-score { color: var(--muted); font-size: 12px; font-weight: 700; }
.site-preview {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  margin: 15px 0 17px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #e8ece9;
  color: white;
  text-decoration: none;
}
.site-preview::after { content: ""; position: absolute; inset: 52% 0 0; background: linear-gradient(transparent, rgba(10, 18, 13, .76)); pointer-events: none; }
.site-preview img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: top center; transition: transform .35s ease; }
.site-preview:hover img { transform: scale(1.025); }
.site-preview span, .site-preview b { position: absolute; z-index: 1; bottom: 11px; font-size: 10px; line-height: 1; }
.site-preview span { left: 11px; padding: 6px 8px; border-radius: 7px; background: rgba(19, 33, 24, .82); font-weight: 750; }
.site-preview b { right: 11px; padding: 6px 8px; border-radius: 7px; background: rgba(255, 255, 255, .92); color: var(--ink); }
.client-title { display: flex; align-items: center; gap: 13px; margin: 18px 0 14px; }
.company-monogram { flex: 0 0 46px; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 13px; background: var(--ink); color: white; font-family: Georgia, serif; font-size: 14px; }
.client-title h3 { margin: 0 0 5px; font-size: 17px; line-height: 1.15; letter-spacing: -.02em; }
.client-title p { margin: 0; color: var(--muted); font-size: 11px; }
.website-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; overflow: hidden; border-radius: 10px; background: var(--soft); text-decoration: none; color: var(--green); font-size: 12px; font-weight: 700; }
.website-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.website-link:hover { background: #e6eee7; }

.criteria { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 11px; margin: 20px 0; }
.criterion > div:first-child { min-height: 25px; display: flex; align-items: flex-end; justify-content: space-between; gap: 5px; margin-bottom: 6px; color: var(--muted); font-size: 9px; line-height: 1.2; }
.criterion b { color: var(--ink); font-size: 10px; }
.mini-progress { height: 4px; overflow: hidden; border-radius: 999px; background: #e8ede9; }
.mini-progress i { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.criterion:nth-child(2) .mini-progress i { background: var(--warm); }
.criterion:nth-child(6) .mini-progress i { background: #7fae35; }
.insight { min-height: 92px; padding: 14px; border-left: 3px solid var(--warm); border-radius: 0 10px 10px 0; background: #fff8ed; }
.insight span { color: #9a6a2d; font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.insight p { margin: 6px 0 0; font-size: 12px; line-height: 1.45; }
.angle { min-height: 61px; padding: 13px 2px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.angle span { color: var(--ink); font-weight: 800; }
.status-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); }
.status-row label { color: var(--muted); font-size: 11px; font-weight: 700; }
.status-row select { min-width: 150px; padding: 8px 10px; font-size: 11px; font-weight: 700; }
.card-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.card-actions button, .card-actions .action-link { min-height: 42px; border-radius: 10px; font-size: 11px; font-weight: 800; transition: .18s ease; }
.card-actions .action-link { display: flex; align-items: center; justify-content: center; padding: 0 14px; }
.primary-button { border: 0; background: var(--green); color: white; }
.primary-button:hover { background: var(--green-dark); }
.reject-button { padding: 0 13px; border: 1px solid #ead7d3; background: white; color: var(--red); }
.reject-button:hover { background: #fff1ee; }
.secondary-button { border: 1px solid var(--line); background: white; color: var(--ink); }
.full { grid-column: 1 / -1; }

.find-more { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-top: 28px; padding: 36px; border-radius: 22px; background: var(--lime); }
.find-more .eyebrow { color: #4e6b20; }
.find-more p:last-child { margin: 12px 0 0; color: #4f6331; }
.find-more button { padding: 15px 21px; white-space: nowrap; }
.find-more button span { margin-left: 24px; }
.empty-state { padding: 60px; text-align: center; border: 1px dashed var(--line); border-radius: 18px; color: var(--muted); }
.empty-state strong { color: var(--ink); font-size: 18px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(15, 24, 18, .56); backdrop-filter: blur(8px); }
.modal { position: relative; width: min(480px, 100%); padding: 32px; border-radius: 22px; background: var(--paper); box-shadow: 0 30px 90px rgba(0,0,0,.24); }
.modal > p:not(.eyebrow) { color: var(--muted); line-height: 1.5; }
.modal-close { position: absolute; top: 15px; right: 16px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #e8ede9; font-size: 22px; }
.modal label { display: grid; gap: 7px; margin-top: 17px; color: var(--muted); font-size: 12px; font-weight: 750; }
.modal select, .modal input { width: 100%; height: 46px; padding: 0 12px; }
.modal-submit { width: 100%; margin-top: 24px; min-height: 48px; }
.toast { position: fixed; z-index: 60; right: 24px; bottom: 24px; display: flex; align-items: center; gap: 10px; max-width: 380px; padding: 14px 18px; border-radius: 13px; background: var(--ink); color: white; box-shadow: 0 16px 50px rgba(0,0,0,.18); font-size: 13px; font-weight: 700; }
.toast span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--lime); color: var(--ink); }

@media (max-width: 1080px) {
  .client-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analytics { margin-inline: 24px; grid-template-columns: 1fr 1fr; }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 700px) {
  .topbar { height: 64px; }
  .sync-status { display: none; }
  .header-cta { padding: 10px 12px; font-size: 12px; }
  .hero { align-items: flex-start; padding-top: 48px; }
  .hero-score { display: none; }
  .hero h1 { font-size: 48px; }
  .hero-copy { font-size: 15px; }
  .analytics { grid-template-columns: 1fr; margin: 0 20px 42px; }
  .metric { border-right: 0; border-bottom: 1px solid var(--line); }
  .metric:last-child { border-bottom: 0; }
  .toolbar { grid-template-columns: 1fr; }
  .toolbar > select { height: 46px; }
  .client-grid { grid-template-columns: 1fr; }
  .find-more { align-items: stretch; flex-direction: column; padding: 28px 22px; }
  .find-more button { width: 100%; }
  .section-heading h2, .find-more h2 { font-size: 31px; }
}
