/* Jigtree style ("UI"): Inter and JetBrains Mono, background #F7F5F0, text #0C1425, accent #C48B6E. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/inter-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/jetbrains-mono-latin.woff2') format('woff2');
}
:root {
  --navy: #0c1425;
  --paper: #f7f5f0;
  --surface: #ffffff;
  --line: #e7e2d7;
  --line-soft: #f0ece4;
  --muted: #5f6573;
  --copper: #c48b6e;
  /* Copper dark enough to read as text on paper and white. */
  --copper-text: #9a5f42;
  --green-bg: #e6f4ea;
  --green: #1e6b3a;
  --amber-bg: #fdf0d8;
  --amber: #8a5300;
  --red-bg: #fde8e8;
  --red: #a61b1b;
  --grey-bg: #eef0f3;
  --grey: #475467;
  --copper-bg: #f6ebe4;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scrollbar-gutter: stable;
}
html.signing-in body {
  display: none;
}
body {
  font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  background: var(--paper);
  color: var(--navy);
}
code,
pre {
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}
[hidden] {
  display: none !important;
}
a {
  color: var(--navy);
  text-decoration: underline;
  text-decoration-color: var(--copper);
  text-underline-offset: 2px;
}
a:hover {
  color: var(--copper-text);
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--navy);
  color: var(--paper);
  height: 56px;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.brand {
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 1px;
  white-space: nowrap;
}
.brand-jig {
  color: var(--paper);
}
.brand-tree {
  color: var(--copper);
}
.brand-app {
  margin-left: 0.75rem;
  color: var(--paper);
  opacity: 0.6;
  font-weight: 400;
  letter-spacing: 0;
}
.nav-links {
  display: flex;
  align-items: stretch;
  gap: 1.5rem;
  flex: 1;
  height: 100%;
}
.nav-link {
  display: flex;
  align-items: center;
  color: var(--paper);
  opacity: 0.75;
  text-decoration: none;
  font-size: 0.9rem;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.nav-link:hover {
  opacity: 1;
  color: var(--paper);
}
.nav-link.active {
  opacity: 1;
  border-bottom-color: var(--copper);
}
.nav-connect {
  margin-left: auto;
}
.nav-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  white-space: nowrap;
}
.nav-user button {
  background: transparent;
  color: var(--paper);
  border: 1px solid rgba(247, 245, 240, 0.4);
  border-radius: 4px;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  font: inherit;
}

/* Page */
main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 1.75rem 2rem 3rem;
}
h1 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
h2 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.75rem 0 0.6rem;
}
.empty {
  color: var(--muted);
}
.muted {
  color: var(--muted);
  font-size: 0.85rem;
}
.error {
  color: var(--red);
  margin-top: 1rem;
}
.link-button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 0.85rem;
  color: var(--copper-text);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Tables */
table.data {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  font-size: 0.875rem;
}
table.data th,
table.data td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
table.data tbody tr:last-child td {
  border-bottom: 0;
}
table.data th {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: #fbfaf7;
}
table.data .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
table.data tbody tr:hover td {
  background: #faf8f4;
}
table.data a {
  font-weight: 500;
  text-decoration: none;
}
table.data a:hover {
  text-decoration: underline;
  text-decoration-color: var(--copper);
}
table.data tr.ended td {
  color: var(--muted);
}
table.data tr.struck td.num {
  text-decoration: line-through;
}
.name-cell .badge {
  margin-left: 0.25rem;
}
.status-cell {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.renewal {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.when {
  font-size: 0.8rem;
  color: var(--muted);
}
.when.amber {
  color: var(--amber);
  font-weight: 600;
}
.when.red {
  color: var(--red);
  font-weight: 600;
}

/* Badges and chips */
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.5;
  border-radius: 999px;
  padding: 0 0.5rem;
  background: var(--grey-bg);
  color: var(--grey);
  white-space: nowrap;
  vertical-align: 1px;
}
.badge.green {
  background: var(--green-bg);
  color: var(--green);
}
.badge.amber {
  background: var(--amber-bg);
  color: var(--amber);
}
.badge.red {
  background: var(--red-bg);
  color: var(--red);
}
.badge.copper {
  background: var(--copper-bg);
  color: var(--copper-text);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.35rem;
}
.chip {
  font-size: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 0.4rem;
  color: var(--grey);
  background: #fbfaf7;
}
.chip.more {
  cursor: help;
}

/* Customer list toolbar */
.toolbar {
  margin-bottom: 0.75rem;
}
.search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}
.search input {
  flex: 1;
  max-width: 28rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid #d9d4c7;
  border-radius: 6px;
  font: inherit;
  background: var(--surface);
}
.search .button {
  border: 0;
  cursor: pointer;
  font: inherit;
  padding: 0.45rem 1rem;
}
.search .clear {
  font-size: 0.85rem;
}
.list-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: center;
}
.toggle {
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}
.pager {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Header card (customer and product) */
.header-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  display: grid;
  gap: 0.9rem;
}
.header-card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.header-card .tags .badge {
  font-size: 0.8rem;
  padding: 0.05rem 0.65rem;
}
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: 0.75rem 1.5rem;
}
.fact {
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}
.fact .label,
.note .label,
.group-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.1rem;
}
.facts-group + .facts-group {
  border-top: 1px solid var(--line-soft);
  padding-top: 0.9rem;
}
.group-label {
  color: var(--copper-text);
  margin-bottom: 0.5rem;
}

/* Collapsed sections */
details.section {
  margin-top: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}
details.section > summary {
  cursor: pointer;
  padding: 0.7rem 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
}
details.section > summary::-webkit-details-marker {
  display: none;
}
details.section > summary::before {
  content: '+';
  width: 1rem;
  color: var(--copper-text);
}
details.section[open] > summary::before {
  content: '-';
}
details.section .count {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.85rem;
}
details.section > :not(summary) {
  margin: 0 1rem 1rem;
}
details.section table.data {
  width: calc(100% - 2rem);
  border-radius: 6px;
}
.notes {
  display: grid;
  gap: 0.75rem;
}
.note p {
  white-space: pre-line;
  max-width: 78ch;
}
ul.repos {
  list-style: none;
  columns: 3 16rem;
  column-gap: 1.5rem;
  font-size: 0.85rem;
}
ul.repos li {
  break-inside: avoid;
  padding: 0.1rem 0;
  overflow-wrap: anywhere;
}

/* Meetings */
.filter {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 0.6rem;
  background: var(--surface);
}
.filter button {
  background: none;
  border: 0;
  border-right: 1px solid var(--line);
  padding: 0.35rem 0.8rem;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--muted);
}
.filter button:last-child {
  border-right: 0;
}
.filter button.on {
  background: var(--navy);
  color: var(--paper);
}
.meetings > .muted,
.meetings > .empty {
  margin-bottom: 0.5rem;
}
ul.timeline {
  list-style: none;
  display: grid;
  gap: 0.6rem;
}
ul.timeline li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line);
  border-radius: 8px;
  padding: 0.75rem 1rem;
}
ul.timeline li.is-customer {
  border-left-color: var(--green);
}
.timeline-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.6rem;
}
.when-line {
  margin-left: auto;
  white-space: nowrap;
}
ul.timeline .summary {
  margin: 0.45rem 0 0.15rem;
  white-space: pre-line;
  max-width: 78ch;
}
ul.timeline .summary.clamp {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
ul.timeline a.report {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.85rem;
}

/* Connect Read.ai */
.lead {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.status {
  margin: 1rem 0 1.25rem;
  padding: 0.9rem 1rem;
  border-radius: 8px;
  font-size: 1rem;
  max-width: 46rem;
}
.status.ok {
  background: var(--green-bg);
  border: 1px solid #7cc58a;
}
.status.waiting {
  background: var(--amber-bg);
  border: 1px solid #e5b467;
}
ol.steps {
  list-style: none;
  display: grid;
  gap: 0.8rem;
  max-width: 46rem;
}
ol.steps .step {
  display: flex;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem 1.1rem;
}
.step-number {
  flex: none;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--copper);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-body {
  min-width: 0;
  flex: 1;
}
.step-body h3 {
  font-size: 1.05rem;
  margin-bottom: 0.3rem;
}
.step-body p {
  margin-bottom: 0.5rem;
}
.copy-row {
  margin: 0.4rem 0;
}
.button.big {
  font-size: 1rem;
  padding: 0.7rem 1.4rem;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}
.button.big.done {
  background: var(--green);
}
input.copy {
  width: 100%;
  margin: 0.4rem 0 0.3rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid #d9d4c7;
  border-radius: 4px;
  background: #fbfaf7;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
}
kbd {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  border: 1px solid #d9d4c7;
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 0 0.3rem;
  background: #fff;
}
.past {
  max-width: 46rem;
  margin-top: 1.5rem;
}
.past .status {
  background: #fbfaf7;
  border: 1px solid #d9d4c7;
}
.past .status.ok {
  background: var(--green-bg);
  border-color: #7cc58a;
}
.past .status.waiting {
  background: var(--amber-bg);
  border-color: #e5b467;
}
.past .status.failed {
  background: var(--red-bg);
  border-color: #e5a0a0;
}
.button.big:disabled {
  opacity: 0.5;
  cursor: default;
}
ul.faq {
  max-width: 46rem;
  display: grid;
  gap: 0.5rem;
  padding-left: 1.1rem;
}

/* Shared with the sign-in pages */
.center {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 56px);
}
.card {
  background: #fff;
  border-radius: 8px;
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: 0 1px 3px rgba(12, 20, 37, 0.08);
}
.card p + p {
  margin-top: 0.4rem;
}
.spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid #e8e4da;
  border-top-color: var(--copper);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-bottom: 1rem;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.actions {
  margin-top: 1.25rem;
}
.button {
  display: inline-block;
  background: var(--navy);
  color: var(--paper);
  text-decoration: none;
  border-radius: 6px;
  padding: 0.5rem 1.2rem;
}
.button:hover {
  color: var(--paper);
}
.button.light {
  background: var(--surface);
  color: var(--navy);
  border: 1px solid var(--line);
  padding: 0.35rem 0.9rem;
}

/* Phone */
@media (max-width: 760px) {
  .navbar {
    gap: 1rem;
    padding: 0 1rem;
  }
  .brand-app,
  #user-email {
    display: none;
  }
  .nav-links {
    overflow-x: auto;
    gap: 1rem;
    scrollbar-width: none;
  }
  .nav-connect {
    margin-left: 0;
  }
  main {
    padding: 1.25rem 1rem 2rem;
  }
  table.data {
    display: block;
    overflow-x: auto;
  }
  .when-line {
    margin-left: 0;
  }
}
