/* evDial Directory.
 *
 * A directory, set like a printed one: a navy masthead, then a white page.
 * Each line reads name, a detail, dotted leaders, the number; the letter a
 * line is filed under hangs in the margin. Newsreader for titles and the
 * letters, Hanken Grotesk for everything else (tabular figures for numbers).
 * Navy is structure; green is only ever "call"; red is only ever "end".
 */

:root {
  --ink: #0d1a2d;
  --ink-2: #4b5a72;
  --ink-3: #8592a6;
  --rule: #e3e7ee;
  --rule-strong: #c3cbd8;
  --leader: #b4bdcb;
  --paper: #ffffff;
  --tint: #f3f6fa;
  --navy: #0f2547;
  --navy-2: #1c3d73;
  --call: #116a47;
  --call-2: #0d573a;
  --live: #b3261e;
  --ringing: #a15c00;
  --talking: #17663f;
  --serif: 'Newsreader', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --sans: 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --gutter: 56px;
  --edge: 32px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

p {
  margin: 0 0 0.6em;
}

a {
  color: inherit;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

[hidden] {
  display: none !important;
}

/* ── Frame: the masthead with the pages in it, then the page ───────────── */

.desk {
  min-height: 100vh;
  padding-bottom: 72px;
}

.top {
  display: flex;
  align-items: stretch;
  gap: 16px;
  height: 60px;
  padding: 0 var(--edge);
  background: var(--navy);
  color: #fff;
}

.top > * {
  align-self: center;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.32rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.top-org {
  padding-left: 16px;
  border-left: 1px solid rgb(255 255 255 / 0.28);
  color: rgb(255 255 255 / 0.72);
  white-space: nowrap;
}

.top-org:empty {
  display: none;
}

.tabs {
  display: flex;
  align-self: stretch;
  gap: 4px;
  margin-left: 28px;
}

.tabs a {
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: rgb(255 255 255 / 0.72);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.tabs a:hover {
  color: #fff;
}

.tabs a[aria-current='page'] {
  box-shadow: inset 0 -3px #fff;
  color: #fff;
}

.top-right {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
  margin-left: auto;
  font-size: 0.93rem;
}

.top-right select {
  width: auto;
  max-width: 16rem;
  padding: 5px 8px;
}

.top-who {
  overflow: hidden;
  color: rgb(255 255 255 / 0.72);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top .link {
  flex: none;
  color: #fff;
  text-decoration-color: rgb(255 255 255 / 0.45);
  white-space: nowrap;
}

.top :focus-visible {
  outline-color: #fff;
}

.binder {
  max-width: 1040px;
  margin: 0 auto;
  padding: 44px var(--edge) 0;
}

.page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0 24px;
  margin-bottom: 26px;
}

.page-head h1,
.cover h1 {
  grid-column: 1 / -1;
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 2.6rem;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.018em;
}

.lede {
  grid-column: 1 / -1;
  max-width: 40em;
  margin: 0 0 26px;
  color: var(--ink-2);
  font-size: 1.04rem;
}

.find {
  display: block;
  max-width: 27rem;
}

.find input {
  max-width: none;
  padding-left: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%238592a6' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='4.6'/%3E%3Cpath d='m10.6 10.6 3.4 3.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 13px 50%;
  background-size: 15px;
}

/* Two ways to order a listing: one is pressed. */
.orders {
  display: flex;
  justify-self: end;
  padding: 3px;
  border-radius: 9px;
  background: var(--tint);
}

.order {
  padding: 6px 14px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--ink-2);
  font: inherit;
  font-size: 0.93rem;
  font-weight: 500;
  cursor: pointer;
}

.order:hover {
  color: var(--ink);
}

.order[aria-pressed='true'] {
  background: var(--paper);
  box-shadow: 0 1px 2px rgb(13 26 45 / 0.16);
  color: var(--navy);
  font-weight: 600;
}

/* What can be done on a page: the first is the usual one. */
.tools {
  display: flex;
  flex-wrap: wrap;
  justify-self: end;
  gap: 8px;
}

/* ── The register: name, detail, leaders, number ───────────────────────── */

.listing {
  position: relative;
  padding-left: var(--gutter);
}

.listing:has(> .thumb) {
  padding-right: 40px;
}

.columns,
.entry-line {
  display: grid;
  /* The name's column is a fixed share, so details start in one place whatever the number's length. */
  grid-template-columns: 44% minmax(0, 1fr) minmax(7rem, auto);
  align-items: baseline;
}

.columns {
  padding: 0 12px 9px;
  border-bottom: 1px solid var(--ink);
  color: var(--ink-2);
  font-size: 0.84rem;
  font-weight: 500;
}

.columns span:last-child {
  text-align: right;
}

.chapter {
  padding: 3px 0;
  border-bottom: 1px solid var(--rule);
}

.chapter-head {
  margin: 0;
  padding: 20px 12px 4px;
  color: var(--ink-2);
  font-size: 0.86rem;
  font-weight: 600;
}

.chapter-head small {
  margin-left: 8px;
  color: var(--ink-3);
  font-size: inherit;
  font-weight: 400;
}

/* A letter hangs in the margin, beside the first name filed under it. */
.chapter.is-letter {
  position: relative;
  scroll-margin-top: 16px;
}

.chapter.is-letter > .chapter-head {
  position: absolute;
  top: 3px;
  left: calc(-1 * var(--gutter));
  width: var(--gutter);
  padding: 0;
  color: var(--navy);
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 48px;
}

.entries {
  margin: 0;
  padding: 0;
  list-style: none;
}

.listing > .entries,
.page > .entries {
  padding: 3px 0;
  border-bottom: 1px solid var(--rule);
}

/* The leaders are a row of dots behind the line; the name, the detail and
   the number each stand on a patch of the line's own colour. */
.entry-line {
  --row: var(--paper);
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 8px;
  background-color: transparent;
  background-image: radial-gradient(circle, var(--leader) 0.85px, transparent 1.15px), linear-gradient(var(--row), var(--row));
  background-repeat: repeat-x, no-repeat;
  background-position: left top 17px, 0 0;
  background-size: 7px 3px, auto;
  background-origin: content-box, border-box;
  background-clip: content-box, border-box;
  color: inherit;
  font: inherit;
  line-height: 24px;
  text-align: left;
}

button.entry-line {
  cursor: pointer;
}

button.entry-line:hover,
.entry.is-open > .entry-line {
  --row: var(--tint);
}

.entry-name,
.entry-sub,
.entry-number {
  background: var(--row);
}

/* The name's patch fills its column, so the leaders run from the detail (or
   from where it would start) to the number. */
.entry-name {
  padding-right: 10px;
  font-weight: 500;
}

.entry.is-open .entry-name {
  font-weight: 600;
}

.entry-sub {
  justify-self: start;
  max-width: 100%;
  padding-right: 10px;
  color: var(--ink-2);
}

.entry-sub:empty {
  display: none;
}

.entry-number {
  grid-column: 3;
  justify-self: end;
  padding-left: 10px;
  font-size: 1.06rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: 0.015em;
  text-align: right;
}

.entry-number.is-none {
  color: var(--ink-3);
  font-size: 0.93rem;
  font-weight: 400;
  letter-spacing: 0;
}

.badge {
  display: inline-block;
  margin-left: 10px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgb(15 37 71 / 0.09);
  color: var(--navy);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 20px;
  vertical-align: 1px;
  white-space: nowrap;
}

/* An open entry: its line and its details on one tinted sheet. */
.entry.is-open {
  margin: 2px 0 10px;
  border-radius: 10px;
  background: var(--tint);
}

.slip {
  padding: 6px 12px 20px;
}

.slip > :last-child {
  margin-bottom: 0;
}

.slip-lead {
  margin: 0 0 4px;
  font-weight: 600;
}

.note {
  max-width: 44em;
  color: var(--ink-2);
  font-size: 0.93rem;
}

.belongs {
  margin: 10px 0;
}

.belongs .link {
  margin-left: 8px;
}

.tag {
  display: inline-block;
  margin: 2px 6px 2px 0;
  padding: 1px 11px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: var(--paper);
  font-size: 0.9rem;
  font-weight: 500;
}

.tag.is-group {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.call {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 16px;
}

.call-from {
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.call-from select {
  width: auto;
  margin-left: 4px;
}

.slip-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin: 12px 0;
}

.empty {
  max-width: 40em;
  margin-top: 8px;
  padding: 22px 26px;
  border-radius: 10px;
  background: var(--tint);
  color: var(--ink-2);
}

.empty > :last-child {
  margin-bottom: 0;
}

/* ── The A–Z index beside a long listing ───────────────────────────────── */

.thumb {
  position: sticky;
  top: 16px;
  float: right;
  display: flex;
  flex-direction: column;
  width: 24px;
  margin: 36px -40px 0 0;
}

.thumb button {
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: none;
  color: var(--navy);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 18px;
  cursor: pointer;
}

.thumb button:hover:not(:disabled) {
  background: var(--navy);
  color: #fff;
}

.thumb button:disabled {
  color: var(--rule-strong);
  font-weight: 400;
  cursor: default;
}

@media (max-height: 720px) {
  .thumb button {
    height: 15px;
    font-size: 0.66rem;
    line-height: 15px;
  }
}

/* ── Buttons, links, forms ─────────────────────────────────────────────── */

.button {
  display: inline-block;
  padding: 8px 17px;
  border: 1px solid var(--navy);
  border-radius: 7px;
  background: var(--navy);
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.button:hover:not(:disabled) {
  border-color: var(--navy-2);
  background: var(--navy-2);
}

.button:disabled {
  opacity: 0.55;
  cursor: default;
}

.button.quiet {
  border-color: var(--rule-strong);
  background: var(--paper);
  color: var(--ink);
  font-weight: 500;
}

.button.quiet:hover:not(:disabled) {
  border-color: var(--ink-2);
  background: var(--paper);
}

/* Starting a call is the one green thing. */
.button.dial {
  border-color: var(--call);
  background: var(--call);
}

.button.dial:hover:not(:disabled) {
  border-color: var(--call-2);
  background: var(--call-2);
}

.button.live {
  border-color: var(--live);
  background: var(--live);
}

.button.live:hover:not(:disabled) {
  border-color: #8f1d17;
  background: #8f1d17;
}

.link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--navy-2);
  font: inherit;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--rule-strong);
  text-underline-offset: 3px;
  cursor: pointer;
}

.link:hover {
  text-decoration-color: currentColor;
}

input,
select {
  width: 100%;
  max-width: 27rem;
  padding: 9px 12px;
  border: 1px solid var(--rule-strong);
  border-radius: 7px;
  background-color: var(--paper);
  color: var(--ink);
  font: inherit;
}

textarea {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--rule-strong);
  border-radius: 7px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  resize: vertical;
}

input[type='file'] {
  padding: 6px;
}

textarea::placeholder,
input::placeholder {
  color: var(--ink-3);
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--ink-3);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: var(--navy-2);
  outline-offset: 0;
}

input[readonly] {
  background-color: var(--tint);
  color: var(--ink-2);
}

input[type='checkbox'] {
  width: 1rem;
  height: 1rem;
  flex: none;
  accent-color: var(--navy);
}

.field {
  display: block;
  margin: 0 0 16px;
}

.field-label {
  display: block;
  margin-bottom: 5px;
  font-size: 0.9rem;
  font-weight: 600;
}

.field-hint {
  display: block;
  max-width: 40em;
  margin-top: 6px;
  color: var(--ink-2);
  font-size: 0.88rem;
}

.form.boxed {
  margin: 0 0 30px;
  padding: 22px 26px 24px;
  border-radius: 10px;
  background: var(--tint);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.problem {
  color: var(--live);
  font-weight: 500;
}

fieldset {
  margin: 0 0 14px;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 4px;
  padding: 0;
  font-size: 0.9rem;
  font-weight: 600;
}

.tick {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 3px 0;
  cursor: pointer;
}

.tick small {
  margin-left: 8px;
  color: var(--ink-2);
  font-size: 0.88rem;
}

.copy {
  display: flex;
  gap: 8px;
  margin: 10px 0 14px;
}

.copy input {
  min-width: 0;
  max-width: none;
}

/* ── Importing people ──────────────────────────────────────────────────── */

.box-title {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.sources .form-actions {
  margin-top: 8px;
}

.preview {
  max-height: 22rem;
  margin: 12px 0 14px;
  overflow: auto;
  border: 1px solid var(--rule-strong);
  border-radius: 8px;
  background: var(--paper);
}

.preview table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.preview th,
.preview td {
  padding: 7px 12px;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

.preview th {
  position: sticky;
  top: 0;
  background: var(--tint);
  color: var(--ink-2);
  font-size: 0.84rem;
  font-weight: 500;
  white-space: nowrap;
}

.preview td.num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.preview td small {
  display: block;
  color: var(--ringing);
}

.preview tr.is-same td {
  color: var(--ink-3);
}

.preview tr.is-skip td {
  color: var(--live);
}

/* ── The Organisation page ─────────────────────────────────────────────── */

.part {
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid var(--rule-strong);
}

.page-head + .part {
  margin-top: 0;
}

.part h2 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.part > p {
  max-width: 44em;
}

.members {
  margin: 0 0 16px;
  padding: 0;
  border-top: 1px solid var(--rule);
  list-style: none;
}

.members li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 4.5rem;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--rule);
}

.member-who b {
  font-weight: 500;
}

.member-who small {
  display: block;
  overflow: hidden;
  color: var(--ink-2);
  font-size: 0.88rem;
  text-overflow: ellipsis;
}

.members select {
  width: auto;
  padding: 5px 8px;
}

.role {
  color: var(--ink-2);
}

/* ── The call panel: a small window in the corner ──────────────────────── */

.dialler {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 15;
  display: flex;
  justify-content: flex-end;
  width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}

.dialler > * {
  pointer-events: auto;
}

/* Hidden, it is a pill: "New call", or the call in progress and its clock. */
.dpill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px 12px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--navy);
  box-shadow: 0 8px 24px rgb(13 26 45 / 0.28);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.dpill:hover {
  background: var(--navy-2);
}

.dpill.is-calling,
.dpill.is-ringing {
  background: var(--navy-2);
}

.dpill.is-talking {
  background: var(--call);
}

.dpill-icon {
  width: 18px;
  height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fff' stroke-width='1.4' stroke-linejoin='round'%3E%3Cpath d='M3.7 1.8h2.1l1.1 2.9-1.5 1.1a8.2 8.2 0 0 0 3.8 3.8l1.1-1.5 2.9 1.1v2.1c0 .6-.5 1-1 1A10.5 10.5 0 0 1 2.7 2.8c0-.5.4-1 1-1Z'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.dclock {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.dpanel {
  width: 100%;
  max-height: calc(100vh - 110px);
  overflow: auto;
  padding: 18px 20px 20px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 18px 50px rgb(13 26 45 / 0.24);
}

.dpanel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}

.dpanel-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.dpanel-sub {
  margin: 20px 0 8px;
  color: var(--ink-2);
  font-size: 0.86rem;
  font-weight: 600;
}

.dnote {
  margin: 12px 0 0;
}

/* Starting a call: from, to, Call. */
.dfield {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr);
  align-items: center;
  min-height: 42px;
  margin-bottom: 8px;
}

.dlabel {
  color: var(--ink-2);
  font-size: 0.9rem;
}

.dfield input,
.dfield select {
  max-width: none;
}

.dfrom {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.dfrom small,
.dresult-who small,
.dside-who small {
  color: var(--ink-2);
  font-size: 0.86rem;
}

/* Who was chosen: the name and where on the left, the number and Change on the right. */
.dchosen {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0 12px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--tint);
}

.dchosen .dresult-who {
  grid-row: 1 / span 2;
}

.dchosen .dresult-who small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dchosen .link {
  justify-self: end;
  font-size: 0.9rem;
}

.dside-number {
  font-weight: 600;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: 0.015em;
  white-space: nowrap;
}

.dresult-who,
.dside-who {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}

.dresult-who b,
.dside-who b {
  overflow: hidden;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dresults {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.dresults-head {
  padding: 6px 12px 4px;
  color: var(--ink-2);
  font-size: 0.84rem;
  font-weight: 500;
}

.dresults-none {
  padding: 8px 12px;
  color: var(--ink-2);
  font-size: 0.93rem;
}

.dresult {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.dresult:hover,
.dresult.is-at {
  background: var(--tint);
}

.dresult.is-off {
  color: var(--ink-3);
  cursor: default;
}

.dresult.is-off:hover {
  background: none;
}

.dgo {
  width: 100%;
  margin-top: 14px;
  padding: 11px 17px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* A call in progress: what it is doing, a sentence, the two phones. */
.dcall {
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 10px;
}

.dcall + .dcall,
.dcall + .dcompose {
  margin-top: 14px;
}

.dcall-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--navy-2);
  color: #fff;
}

.dcall.is-talking .dcall-head {
  background: var(--call);
}

.dcall.is-ended .dcall-head {
  background: var(--tint);
  color: var(--ink-2);
}

.dcall-state {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
}

.pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #f0b34a;
  animation: pulse 1.2s ease-in-out infinite;
}

.is-talking .pulse {
  background: #fff;
  animation: none;
}

@keyframes pulse {
  50% {
    opacity: 0.25;
  }
}

.dcall-say {
  margin: 0;
  padding: 12px 14px 4px;
  font-weight: 500;
}

.dsides {
  margin: 0;
  padding: 4px 14px;
  list-style: none;
}

.dside {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
}

.dside + .dside {
  border-top: 1px solid var(--rule);
}

.dside-at {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.3;
}

/* What a phone is doing: grey while it is being called, amber ringing, green answered. */
.dside-leg {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-2);
  font-size: 0.86rem;
}

.dside-leg::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-3);
}

.dside.is-ringing .dside-leg {
  color: var(--ringing);
}

.dside.is-ringing .dside-leg::before {
  background: #e0962a;
  animation: pulse 1.2s ease-in-out infinite;
}

.dside.is-answered .dside-leg {
  color: var(--talking);
  font-weight: 500;
}

.dside.is-answered .dside-leg::before {
  background: var(--talking);
}

.dside.is-hung-up .dside-leg {
  color: var(--live);
}

.dside.is-hung-up .dside-leg::before {
  background: var(--live);
}

.dcall-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 6px 14px 14px;
}

.button.dend {
  border-color: rgb(179 38 30 / 0.5);
  color: var(--live);
}

.button.dend:hover:not(:disabled) {
  border-color: var(--live);
  background: rgb(179 38 30 / 0.06);
}

/* ── Asking first ──────────────────────────────────────────────────────── */

.ask {
  width: min(92vw, 31rem);
  padding: 28px 30px 24px;
  border: 0;
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 70px rgb(13 26 45 / 0.32);
}

.ask::backdrop {
  background: rgb(13 26 45 / 0.5);
}

.ask h2 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.ask-body {
  color: var(--ink-2);
}

.ask-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 22px;
}

.said {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 20;
  max-width: min(92vw, 34rem);
  padding: 11px 18px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  transform: translateX(-50%);
}

/* ── The cover: signing in ─────────────────────────────────────────────── */

.cover {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 40px 20px;
  background: var(--navy);
}

.cover-in {
  width: min(100%, 28rem);
  padding: 40px 44px 44px;
  border-radius: 12px;
  background: var(--paper);
}

.cover-mark {
  margin: 0 0 30px;
  color: var(--navy);
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.cover h1 {
  font-size: 2.1rem;
}

.cover .lede {
  margin-bottom: 0;
  font-size: 1rem;
}

.cover .form {
  margin-top: 26px;
}

.cover .form .button {
  padding: 10px 20px;
}

.cover input {
  max-width: none;
}

.cover .note {
  margin-top: 22px;
}

/* ── Medium screens: the masthead has less room ────────────────────────── */

@media (max-width: 1180px) {
  .top-who {
    display: none;
  }

  .tabs {
    margin-left: 12px;
  }
}

/* ── Narrow screens: the pages move to a bar at the bottom ─────────────── */

@media (max-width: 860px) {
  :root {
    --gutter: 30px;
    --edge: 16px;
  }

  .desk {
    padding-bottom: 88px;
  }

  .top {
    height: 54px;
  }

  .top-org {
    display: none;
  }

  .binder {
    padding-top: 26px;
  }

  .tabs {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10;
    gap: 0;
    margin: 0;
    border-top: 1px solid var(--rule-strong);
    background: var(--paper);
  }

  .tabs a {
    display: grid;
    flex: 1;
    place-items: center;
    padding: 12px 2px calc(12px + env(safe-area-inset-bottom));
    color: var(--ink-2);
    font-size: 0.78rem;
    line-height: 1.15;
    text-align: center;
    white-space: normal;
  }

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

  .tabs a[aria-current='page'] {
    box-shadow: inset 0 3px var(--navy);
    color: var(--navy);
    font-weight: 600;
  }

  .page-head {
    display: block;
  }

  .page-head h1 {
    font-size: 2.1rem;
  }

  .orders,
  .tools {
    width: fit-content;
    margin-top: 12px;
  }

  .listing:has(> .thumb) {
    padding-right: 26px;
  }

  .thumb {
    margin-right: -28px;
  }

  .columns {
    display: none;
  }

  /* Two lines to an entry, and no leaders. */
  .entry-line {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0 12px;
    padding: 10px 6px;
    background-image: none, linear-gradient(var(--row), var(--row));
  }

  .entry-sub {
    grid-row: 2;
    font-size: 0.9rem;
  }

  .entry-number {
    grid-row: 1 / span 2;
    grid-column: 2;
    align-self: center;
  }

  .chapter.is-letter > .chapter-head {
    font-size: 1.3rem;
    line-height: 44px;
  }

  .chapter-head {
    padding-left: 6px;
  }

  .members li {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .cover-in {
    padding: 30px 24px 32px;
  }

  .dialler {
    right: 12px;
    bottom: calc(70px + env(safe-area-inset-bottom));
    width: calc(100vw - 24px);
  }

  .dpanel {
    max-height: calc(100vh - 150px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pulse,
  .dside.is-ringing .dside-leg::before {
    animation: none;
  }
}
