.settings-view {
  display: none;
}

.settings-view.active {
  display: block;
}

.settings-schedule {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 24px 0;
  padding: 22px;
  border: 1px solid #ded6c9;
  border-radius: 17px;
  background: #faf7ef;
}

.settings-schedule small,
.connection-label {
  color: #9a742d;
  font-size: .68rem;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.settings-schedule h3,
.office-heading h3 {
  margin: 3px 0 4px;
  color: #24494f;
  font: 600 1.25rem Georgia, serif;
}

.settings-schedule p,
.office-heading p {
  margin: 0;
  color: #687976;
  font-size: .86rem;
}

.settings-schedule label {
  display: grid;
  flex: 0 0 210px;
  gap: 6px;
  color: #526764;
  font-size: .72rem;
  font-weight: 750;
}

.settings-schedule input {
  min-height: 43px;
  padding: 8px 10px;
  border: 1px solid #d2c8b8;
  border-radius: 10px;
  background: #fffef9;
  color: #294b4f;
}

.connections-office {
  border: 1px solid #ded6c9;
  border-radius: 18px;
  overflow: hidden;
  background: #fffefa;
}

.office-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 25px;
  background: linear-gradient(130deg, #f7f0df, #edf3f2);
  border-bottom: 1px solid #ded6c9;
}

.office-heading .eyebrow {
  margin-bottom: 2px;
}

.connection-health {
  flex: 0 0 auto;
  padding: 7px 11px;
  border: 1px solid #9cbdb5;
  border-radius: 999px;
  background: #e5f1ed;
  color: #235b50;
  font-size: .72rem;
  font-weight: 800;
}

.connection-health.problem {
  border-color: #d4aaa0;
  background: #f6e7e2;
  color: #8c493c;
}

.connection-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
  padding: 20px 24px 0;
}

.audit-stat {
  padding: 15px;
  border: 1px solid #d9d3c8;
  border-radius: 13px;
  background: #faf9f4;
}

.audit-stat strong {
  display: block;
  color: #1f555e;
  font: 600 1.35rem Georgia, serif;
}

.audit-stat span {
  color: #74817e;
  font-size: .74rem;
}

.connection-controls {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 18px 24px;
}

.connection-tabs {
  display: inline-flex;
  padding: 3px;
  border: 1px solid #d7cfc1;
  border-radius: 11px;
  background: #f4f0e8;
}

.connection-tabs button {
  min-height: 35px;
  padding: 7px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #667773;
  font-size: .75rem;
  font-weight: 750;
}

.connection-tabs button.active {
  background: #fffefa;
  color: #1d515b;
  box-shadow: 0 2px 7px #352c1814;
}

.connection-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 11px;
  border: 1px solid #d7cfc1;
  border-radius: 11px;
  background: #fffefa;
  color: #7d8986;
}

.connection-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #294b4f;
}

.issues-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #657672;
  font-size: .75rem;
  white-space: nowrap;
}

.issues-toggle input {
  accent-color: #1f5964;
}

.connection-content {
  display: grid;
  gap: 18px;
  padding: 0 24px 25px;
}

.connection-group {
  border-top: 1px solid #e4ddd1;
  padding-top: 17px;
}

.connection-group > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.connection-group h4 {
  margin: 0;
  color: #294d52;
  font: 600 1.05rem Georgia, serif;
}

.connection-group > header span {
  color: #87908c;
  font-size: .7rem;
}

.connection-list {
  display: grid;
  gap: 9px;
}

.connection-row {
  display: grid;
  grid-template-columns: minmax(190px, .9fr) minmax(250px, 1.35fr) minmax(170px, .8fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid #ded7cb;
  border-radius: 13px;
  background: #fffefa;
}

.connection-row.issue {
  border-color: #d8aca1;
  background: #fff8f5;
}

.connection-stop-button,
.chapter-stop-link {
  border: 0;
  background: transparent;
  color: #1e5662;
  text-align: left;
}

.connection-stop-button {
  padding: 0;
}

.connection-stop-button small {
  display: block;
  color: #9a742d;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.connection-stop-button strong {
  display: block;
  margin-top: 3px;
  font-size: .86rem;
  line-height: 1.25;
}

.connection-cell {
  min-width: 0;
}

.connection-cell > small {
  display: block;
  margin-bottom: 6px;
  color: #89918d;
  font-size: .61rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.connection-chips,
.chapter-stop-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.connection-chip,
.chapter-stop-link {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 8px;
  border: 1px solid #d8d0c2;
  border-radius: 999px;
  background: #f8f4e9;
  color: #335b60;
  font-size: .68rem;
  font-weight: 750;
  text-decoration: none;
}

.connection-chip.book-chip {
  border-color: #b8cfcb;
  background: #eaf3f1;
}

.connection-status {
  justify-self: end;
  padding: 5px 8px;
  border-radius: 999px;
  background: #e5f1ed;
  color: #276052;
  font-size: .65rem;
  font-weight: 800;
  white-space: nowrap;
}

.connection-status.issue {
  background: #f3dfd9;
  color: #914b3d;
}

.chapter-row {
  grid-template-columns: minmax(145px, .55fr) minmax(190px, .8fr) minmax(260px, 1.4fr) auto;
}

.chapter-number strong {
  display: block;
  color: #234e56;
  font: 600 .95rem Georgia, serif;
}

.chapter-number small {
  color: #8a7550;
  font-size: .65rem;
}

.chapter-number a {
  color: inherit;
  text-decoration: none;
}

.connection-empty {
  padding: 45px 20px;
  border-top: 1px solid #e4ddd1;
  color: #7b8581;
  text-align: center;
}

@media (max-width: 940px) {
  .connection-row {
    grid-template-columns: minmax(180px, .8fr) minmax(230px, 1.2fr) minmax(160px, .8fr);
  }

  .connection-status {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .chapter-row {
    grid-template-columns: 150px minmax(190px, .8fr) minmax(230px, 1.2fr);
  }

  .chapter-row .connection-status {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (max-width: 760px) {
  .mobile-nav {
    grid-template-columns: repeat(4, 1fr);
  }

  .settings-schedule,
  .office-heading {
    display: grid;
  }

  .settings-schedule label {
    width: 100%;
  }

  .connection-health {
    justify-self: start;
  }

  .connection-summary {
    grid-template-columns: 1fr;
    padding: 16px 15px 0;
  }

  .connection-controls {
    grid-template-columns: 1fr;
    padding: 15px;
  }

  .connection-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .connection-content {
    padding: 0 15px 18px;
  }

  .connection-row,
  .chapter-row {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .connection-status,
  .chapter-row .connection-status {
    grid-column: auto;
    justify-self: start;
  }
}
