@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fonts/inter-latin-ext-wght-normal.1ad231aac0a8.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fonts/inter-latin-wght-normal.260c81a4759b.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --ink: #f5f5f5;
  --muted: #b0b0b0;
  --paper: #0a0a0a;
  --surface: #141414;
  --line: #303030;
  --accent: #89aacc;
  --accent-ink: #0a0a0a;
  --danger: #f0b4b4;
  --negotiating: #e0b15a;
  --closed: #8dcea8;
  --lost: #f0b4b4;
  --focus: #a3bed9;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter Variable", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.45;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  background: #f5f5f5;
  color: #0a0a0a;
  padding: 0.5rem 0.75rem;
  z-index: 2;
}

.skip-link:focus { top: 0.75rem; }

::selection { background: #89aacc; color: #0a0a0a; }

a { color: var(--accent); }

a:hover { text-decoration: none; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.shell {
  display: grid;
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "side"
    "main";
  min-height: 100vh;
  background: #fff;
}

.sidebar {
  grid-area: side;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "brand account"
    "nav nav";
  gap: 0.5rem 1rem;
  align-items: center;
  padding: 0.75rem 1rem 0;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.brand {
  grid-area: brand;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: -.03em;
  text-decoration: none;
}

.brand-mark {
  width: 1.15rem;
  height: 1.25rem;
  flex: none;
}

.account {
  grid-area: account;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
}

.who { color: var(--muted); }

.account a { color: var(--ink); }

.account button {
  min-height: 36px;
  padding: 0.25rem 0.75rem;
}

.nav a,
.search button,
.primary,
.secondary,
.danger {
  min-height: 44px;
}

.account button,
.search button,
.primary,
.secondary,
.danger,
.nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  text-decoration: none;
  font: inherit;
}

.account button,
.search button,
.secondary {
  background: transparent;
  color: inherit;
  border: 1px solid currentColor;
  cursor: pointer;
}

.nav {
  grid-area: nav;
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  margin: 0 -1rem;
  padding: 0 1rem 0.6rem;
}

.nav a {
  color: var(--ink);
  border: 1px solid transparent;
  font-weight: 550;
}

.nav a:hover { background: #1c1c1c; }

.nav a[aria-current="page"] {
  background: #f5f5f5;
  color: #0a0a0a;
}

.nav a[aria-current="page"]:hover { background: #bdd4ec; }

main {
  grid-area: main;
  padding: 1.25rem 1rem 3rem;
  max-width: 64rem;
}

.gate main {
  max-width: 32rem;
  margin: 8vh auto;
}

.page-head,
.actions,
.search {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: end;
}

.page-head { justify-content: space-between; align-items: center; margin-bottom: 1rem; }

h1, h2 { line-height: 1.15; margin: 0 0 0.75rem; font-weight: 500; letter-spacing: -.03em; }

.lede, .help, .empty { color: var(--muted); }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 1.25rem;
}

.narrow { max-width: 36rem; }

.field { margin-bottom: 1rem; }

label { display: block; font-weight: 500; margin-bottom: 0.35rem; }

.req {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.85rem;
}

.control,
select,
textarea,
input[type="search"],
input[type="password"],
input[type="text"],
input[type="email"],
input[type="date"],
input[type="number"] {
  width: 100%;
  font: inherit;
  color: inherit;
  background: #0a0a0a;
  border: 1px solid #3a3a3a;
  border-radius: 0.75rem;
  padding: 0.65rem 0.75rem;
  caret-color: #a3bed9;
}

.search .control {
  width: auto;
  min-width: min(100%, 16rem);
  flex: 1 1 16rem;
}

.search button,
.primary {
  background: #f5f5f5;
  color: #0a0a0a;
  border: 1px solid #f5f5f5;
  font-weight: 500;
  cursor: pointer;
}

.search button:hover,
.primary:hover { background: #bdd4ec; border-color: #bdd4ec; }

.primary.inline { display: inline-flex; }

.secondary { color: var(--ink); background: transparent; }

.actions { margin-top: 0.5rem; }

.error { color: var(--danger); margin: 0.35rem 0 0; }

.messages { list-style: none; padding: 0; margin: 0 0 1rem; }

.message {
  background: #19222c;
  border: 1px solid #303030;
  color: #f5f5f5;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
}

.cards { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: 0.75rem; }

.card {
  display: grid;
  gap: 0.2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  padding: 0.9rem 1rem;
  color: inherit;
  text-decoration: none;
  transition: border-color 180ms cubic-bezier(.16, 1, .3, 1);
}

.card:hover { border-color: #89aacc; }

.card strong { font-size: 1.05rem; font-weight: 650; }

.status {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
  font-size: 0.92rem;
  border: 1px solid currentColor;
}

.status-negotiating { color: var(--negotiating); }
.status-closed { color: var(--closed); }
.status-lost { color: var(--lost); }

.danger {
  background: #8f2d2d;
  color: #fff;
  border: 1px solid #8f2d2d;
  cursor: pointer;
}

.danger-link { color: var(--danger); }

.row-links { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; }

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.2rem 0; }

.stage-new { color: var(--accent); }
.stage-contacted { color: var(--negotiating); }
.stage-qualified { color: var(--closed); }
.stage-discarded { color: var(--muted); }
.stage-converted { color: var(--closed); background: #19222c; }
.temp-cold { color: #a3bed9; }
.temp-warm { color: var(--negotiating); }
.temp-hot { color: var(--lost); }
.overdue { color: #fff; background: #8f2d2d; border-color: #8f2d2d; }

.summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.75rem;
  margin: 0 0 1rem;
}

.summary div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  padding: 0.7rem 0.9rem;
}

.summary dt { color: var(--muted); font-size: 0.92rem; }
.summary dd { margin: 0.15rem 0 0; font-size: 1.35rem; font-weight: 650; }
.summary .alert { border-color: var(--danger); }
.summary .alert dd { color: var(--danger); }

.search-field { flex: 1 1 16rem; }
.search-field.narrow-field { flex: 0 1 12rem; }
.search-field .control { width: 100%; }

.convert { display: grid; gap: 0.4rem; margin: 0 0 1.25rem; max-width: 36rem; }
.convert .primary { width: fit-content; }

.facts { display: grid; gap: 0.75rem; margin: 0 0 1.5rem; }
.facts div { margin: 0; }
.facts dt { font-weight: 650; }
.facts dd { margin: 0.15rem 0 0; }

.pager {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-top: 1rem;
}

@media (min-width: 840px) {
  .shell {
    grid-template-columns: 15rem 1fr;
    grid-template-rows: 1fr;
    grid-template-areas: "side main";
  }

  .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1.5rem;
    padding: 1.25rem 1rem;
    border-bottom: 0;
    border-right: 1px solid var(--line);
  }

  .nav {
    flex-direction: column;
    margin: 0;
    padding: 0;
    overflow: visible;
  }

  .nav a { justify-content: flex-start; }

  .account {
    margin-top: auto;
    flex-wrap: wrap;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
  }

  .who { flex-basis: 100%; }

  main { padding: 2rem 2rem 3rem; }

  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
  .page-head { align-items: stretch; flex-direction: column; }
  .who { display: none; }
}

.gate {
  --ink: #f5f5f5;
  --muted: #b0b0b0;
  --paper: #0a0a0a;
  --surface: #141414;
  --line: #303030;
  --accent: #89aacc;
  --accent-ink: #0a0a0a;
  --danger: #f0b4b4;
  --focus: #a3bed9;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 1.5rem;
  overflow: clip;
  color: var(--ink);
  background: var(--paper);
  color-scheme: dark;
  font-family: "Inter Variable", system-ui, sans-serif;
}

.gate ::selection {
  background: #89aacc;
  color: #0a0a0a;
}

.atmosphere {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.atmosphere-wash {
  position: absolute;
  inset: -18%;
  background:
    radial-gradient(ellipse 42% 34% at 24% 36%, rgb(137 170 204 / .32), transparent 68%),
    radial-gradient(ellipse 26% 30% at 74% 64%, rgb(18 179 160 / .14), transparent 70%);
  animation: atmosphere-drift 32s cubic-bezier(.16, 1, .3, 1) infinite alternate;
}

.gate.atmosphere-off .atmosphere-wash { animation: none; }

@keyframes atmosphere-drift {
  from { transform: translate3d(-2%, -1%, 0); }
  to { transform: translate3d(6%, 4%, 0); }
}

.atmosphere-toggle {
  position: absolute;
  z-index: 2;
  right: 1.25rem;
  bottom: 1.25rem;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgb(255 255 255 / .2);
  border-radius: 50%;
  color: #f5f5f5;
  background: rgb(10 10 10 / .8);
  cursor: pointer;
}

.atmosphere-toggle svg { fill: currentColor; }

.atmosphere-toggle .play-icon,
.atmosphere-toggle[aria-pressed="true"] .pause-icon { display: none; }

.atmosphere-toggle[aria-pressed="true"] .play-icon { display: block; }

.gate main {
  position: relative;
  z-index: 1;
  width: min(100%, 26rem);
  max-width: 26rem;
  margin: 0;
  padding: 0;
}

.gate .panel {
  background: var(--surface);
  border-color: var(--line);
  border-radius: 24px;
  box-shadow: 0 16px 40px rgb(0 0 0 / .35);
}

.gate-title {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin-bottom: .85rem;
  font-size: 1.65rem;
  font-weight: 500;
  letter-spacing: -.03em;
  line-height: 1.1;
}

.gate-mark {
  width: 1.35rem;
  height: 1.45rem;
  flex: none;
}

.gate .lede { color: var(--muted); }

.gate label { font-weight: 500; }

.gate .control,
.gate select,
.gate textarea,
.gate input[type="search"],
.gate input[type="password"],
.gate input[type="text"],
.gate input[type="email"] {
  background: #0a0a0a;
  border-color: #3a3a3a;
  border-radius: .75rem;
  caret-color: #a3bed9;
}

.gate .control::placeholder { color: #a3bed9; }

.gate .primary {
  width: 100%;
  margin-top: .25rem;
  min-height: 48px;
  border-radius: 999px;
  background: #f5f5f5;
  color: #0a0a0a;
  border-color: #f5f5f5;
  font-weight: 500;
}

.gate .primary:hover { background: #bdd4ec; border-color: #bdd4ec; }

.gate .message {
  background: #19222c;
  border-color: #303030;
  color: #f5f5f5;
}

@media (prefers-reduced-motion: reduce) {
  .atmosphere-wash { animation: none; }
  .card { transition: none; }
}

@media (max-width: 480px) {
  .atmosphere-toggle {
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
  }
}

.shell main {
  --ink: #0a0a0a;
  --muted: #4a4a4a;
  --paper: #fff;
  --surface: #fff;
  --line: #d8d8d8;
  --accent: #1d4f82;
  --danger: #8f2d2d;
  --negotiating: #8a5a12;
  --closed: #1d6b45;
  --lost: #8f2d2d;
  --focus: #1d4f82;
  background: #fff;
  color: #0a0a0a;
  color-scheme: light;
}

.shell main ::selection { background: #1d4f82; color: #fff; }

.shell main .control,
.shell main select,
.shell main textarea,
.shell main input[type="search"],
.shell main input[type="password"],
.shell main input[type="text"],
.shell main input[type="email"],
.shell main input[type="date"],
.shell main input[type="number"] {
  background: #fff;
  color: #0a0a0a;
  border-color: #c8c8c8;
  caret-color: #0a0a0a;
}

.shell main .search button,
.shell main .primary {
  background: #0a0a0a;
  color: #fff;
  border-color: #0a0a0a;
}

.shell main .search button:hover,
.shell main .primary:hover {
  background: #222;
  border-color: #222;
}

.shell main .message {
  background: #f3f3f3;
  border-color: #d8d8d8;
  color: #0a0a0a;
}

.shell main .stage-converted { background: #e7f4ee; color: #1d6b45; }

.shell main .temp-cold { color: #1d4f82; }

.shell main .card:hover { border-color: #1d4f82; }

.shell main form.search:not(:has(.search-field)) {
  display: grid;
  grid-template-columns: minmax(0, 28rem) auto;
  column-gap: 0.75rem;
  row-gap: 0.35rem;
  align-items: end;
  justify-content: start;
}

.shell main form.search:not(:has(.search-field)) > label { grid-column: 1; grid-row: 1; }

.shell main form.search:not(:has(.search-field)) > .control {
  grid-column: 1;
  grid-row: 2;
  width: 100%;
  min-width: 0;
}

.shell main form.search:not(:has(.search-field)) > button { grid-column: 2; grid-row: 2; }
