:root {
  color: #171717;
  background: #dbdbdb;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 17px;
  line-height: 1.45;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #171717;
  outline-offset: 2px;
}

.site-header,
main {
  width: 92%;
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 30px 0 22px;
  border-bottom: 2px solid #171717;
}

.wordmark,
.eyebrow {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin: 4px 0 0;
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

h2 {
  margin: 4px 0 0;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

h3 {
  margin-bottom: 4px;
}

.header-actions,
.primary-actions,
.dialog-actions,
.dialog-actions > div,
.lead-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.browser-note {
  margin: 0;
  font-size: 0.85rem;
}

main {
  padding: 28px 0 52px;
}

.summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 2px solid #171717;
}

.summary > div {
  display: flex;
  flex-direction: column;
  padding: 18px 20px;
}

.summary > div + div {
  border-left: 2px solid #171717;
}

.summary-number {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.summary-label {
  margin-top: 6px;
  font-size: 0.85rem;
}

.today-section,
.leads-section {
  margin-top: 34px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 220px;
  gap: 10px;
  margin-bottom: 12px;
}

input,
select,
textarea {
  width: 100%;
  border: 2px solid #171717;
  border-radius: 0;
  background: #eeeeee;
}

input,
select {
  min-height: 46px;
  padding: 8px 10px;
}

textarea {
  padding: 10px;
  resize: vertical;
}

.button,
.text-button,
.close-button {
  border: 0;
  background: transparent;
}

.button {
  min-height: 44px;
  padding: 8px 14px;
  border: 2px solid #171717;
  font-weight: 700;
}

.button:hover,
.text-button:hover,
.close-button:hover {
  opacity: 0.65;
}

.button-dark {
  color: #dbdbdb;
  background: #171717;
}

.text-button {
  padding: 2px 0;
  border-bottom: 2px solid currentColor;
}

.danger {
  color: #9f2424;
}

.today-list,
.leads-list {
  display: grid;
  gap: 8px;
}

.today-item,
.lead-row {
  display: grid;
  align-items: center;
  border: 2px solid #171717;
  background: rgba(255, 255, 255, 0.17);
}

.today-item {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 14px 16px;
}

.today-item p,
.lead-row p {
  margin-bottom: 0;
}

.due-date {
  color: #9f2424;
  font-size: 0.85rem;
  font-weight: 700;
}

.lead-row {
  grid-template-columns: minmax(260px, 1.7fr) minmax(150px, 1fr) 130px 150px auto;
  gap: 18px;
  padding: 14px 16px;
}

.lead-company-details {
  min-width: 0;
}

.lead-company {
  overflow: hidden;
  font-size: 1.1rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-company-summary {
  margin-top: 4px;
  color: #464646;
  font-size: 0.85rem;
  line-height: 1.4;
}

.lead-contact,
.lead-follow-up {
  color: #464646;
  font-size: 0.85rem;
}

.status {
  width: fit-content;
  padding: 3px 8px;
  border: 1px solid #171717;
  font-size: 0.75rem;
  font-weight: 700;
}

.lead-actions {
  justify-content: flex-end;
}

.empty-state {
  padding: 44px 20px;
  border: 2px solid #171717;
  text-align: center;
}

.empty-state p {
  margin-bottom: 0;
}

dialog {
  width: min(92%, 760px);
  max-height: 92vh;
  padding: 0;
  border: 2px solid #171717;
  border-radius: 0;
  background: #dbdbdb;
}

.access-view {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.access-card {
  width: min(100%, 520px);
  padding: 30px;
  border: 2px solid #171717;
}

.access-card h1 {
  margin: 8px 0 18px;
}

.access-card label {
  display: grid;
  gap: 5px;
  margin: 22px 0 16px;
  font-size: 0.85rem;
  font-weight: 700;
}

dialog::backdrop {
  background: rgba(23, 23, 23, 0.6);
}

#lead-form {
  padding: 24px;
}

.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 22px;
}

.dialog-heading h2 {
  margin: 0;
}

.close-button {
  padding: 0 4px;
  font-size: 2rem;
  line-height: 0.8;
}

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

.form-grid label {
  display: grid;
  gap: 5px;
  font-size: 0.85rem;
  font-weight: 700;
}

.full-width {
  grid-column: 1 / -1;
}

.dialog-actions {
  justify-content: space-between;
  margin-top: 22px;
}

.dialog-actions > div {
  margin-left: auto;
}

.form-error {
  margin: 14px 0 0;
  color: #9f2424;
  font-weight: 700;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 10;
  max-width: min(90vw, 420px);
  padding: 12px 16px;
  border: 2px solid #171717;
  color: #dbdbdb;
  background: #171717;
  font-weight: 700;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

@media (max-width: 900px) {
  .lead-row {
    grid-template-columns: minmax(0, 1fr) 120px auto;
  }

  .lead-contact,
  .lead-follow-up {
    grid-row: 2;
  }

  .lead-actions {
    grid-column: 3;
    grid-row: 1 / span 2;
  }
}

@media (max-width: 640px) {
  .site-header {
    align-items: flex-start;
    padding-top: 22px;
  }

  .header-actions {
    align-items: flex-end;
    flex-direction: column;
  }

  .browser-note {
    display: none;
  }

  .summary {
    grid-template-columns: 1fr 1fr;
  }

  .summary > div:nth-child(3) {
    border-left: 0;
  }

  .summary > div:nth-child(n + 3) {
    border-top: 2px solid #171717;
  }

  .leads-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .primary-actions {
    width: 100%;
  }

  .primary-actions .button {
    flex: 1;
  }

  .filters,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .full-width {
    grid-column: auto;
  }

  .lead-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 14px;
  }

  .lead-contact,
  .lead-follow-up,
  .lead-actions {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .lead-actions {
    justify-content: flex-start;
    margin-top: 6px;
  }

  .today-item {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }

  .dialog-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .dialog-actions > div {
    width: 100%;
    margin-left: 0;
  }

  .dialog-actions .button {
    flex: 1;
  }
}
