:root {
  color-scheme: light;
  --blue: #273a99;
  --navy: #15275b;
  --orange: #f97316;
  --ink: #2b2730;
  --warm: #f5f2ef;
  --surface: #fff;
  --muted: #625c65;
  --line: #e2ddd8;
  --control-line: #aaa3ab;
  --blue-soft: #eeeff8;
  --blue-line: #dae0ef;
  --danger: #9d241f;
  --danger-soft: #fff1ef;
  --warning: #79510b;
  --warning-soft: #fff4dd;
  --success: #245c40;
  --success-soft: #e9f3ec;
  --heading-font: "Avenir Next", "Century Gothic", "Helvetica Neue", Arial, sans-serif;
  font: 15px/1.5 "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--warm); color: var(--ink); }
button, input, select { font: inherit; }
button { cursor: pointer; touch-action: manipulation; }
button:disabled, input:disabled, select:disabled { cursor: not-allowed; }
button:disabled { opacity: .62; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
h1, h2, p { margin: 0; }
h1, h2 {
  color: var(--navy);
  font-family: var(--heading-font);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.08;
}
h1 { font-size: clamp(36px, 5vw, 65px); }
h2 { font-size: clamp(23px, 4vw, 28px); }

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

.masthead { background: var(--surface); border-bottom: 1px solid var(--line); }
.masthead-content, .workspace {
  width: min(1156px, 100% - 64px);
  margin-inline: auto;
  min-inline-size: 0;
}
.masthead-content {
  display: flex;
  min-height: 84px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 10px;
}
.brand { display: flex; align-items: center; gap: 22px; }
.brand-logo { display: block; width: 136px; height: auto; }
.brand-label {
  padding-inline-start: 22px;
  border-inline-start: 1px solid var(--line);
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
}
.session { display: flex; align-items: center; gap: 12px; }
.environment {
  padding: 3px 8px;
  border: 1px solid #ead5a6;
  border-radius: 999px;
  color: var(--warning);
  background: var(--warning-soft);
  font-size: 12px;
  font-weight: 700;
}

.welcome-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .85fr);
  align-items: center;
  gap: 50px;
  min-height: 540px;
  padding-block: 55px;
}
.eyebrow {
  margin-bottom: 16px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.welcome-message {
  max-width: 440px;
  margin: 20px 0 30px;
  color: var(--muted);
  font-size: 18px;
  overflow-wrap: anywhere;
}
.welcome-art {
  position: relative;
  min-height: 350px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--navy);
}
.welcome-art span {
  position: absolute;
  inset: 14% auto auto 32%;
  width: 65%;
  height: 96%;
  border: 1px solid #a9bcfa77;
  background: #5269bb20;
  transform: skewY(-23deg);
}
.welcome-art span:nth-child(2) { top: 7%; left: 43%; background: #6d83ed20; }
.welcome-art span:nth-child(3) { top: 0; left: 54%; background: #91a1ff20; }
.welcome-art span:nth-child(4) { top: -7%; left: 65%; background: #a4b4ff20; }
.welcome-footer {
  margin-inline: -32px;
  border-top: 1px solid var(--line);
  padding: 20px 32px;
  color: var(--muted);
  font-size: 13px;
}

.directory-workspace { padding-block: 42px; }
.page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
}
.page-heading h1 { font-size: clamp(34px, 5vw, 50px); }
.page-heading p { margin-top: 10px; color: var(--muted); }
.page-heading > button { flex-shrink: 0; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 45px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--navy);
  font-weight: 750;
  line-height: 1.35;
}
.button:hover:not(:disabled) { border-color: var(--blue); background: var(--blue-soft); }
.button.primary { border-color: transparent; background: var(--orange); color: var(--ink); }
.button.primary:hover:not(:disabled) { background: var(--blue); color: var(--surface); }
.button.danger { color: var(--danger); }
.button.danger:hover:not(:disabled) { border-color: var(--danger); background: var(--danger-soft); }
.button.link {
  justify-content: start;
  border-color: transparent;
  background: transparent;
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.provider-status, .draft-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 19px;
  border: 1px solid var(--blue-line);
  border-radius: 7px;
  background: var(--blue-soft);
  color: var(--navy);
  font-size: 14px;
}
.provider-status { margin-bottom: 18px; }
.provider-status-text { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.status-dot { flex: 0 0 8px; height: 8px; border-radius: 50%; background: #2c7853; }
.provider-status:is([data-state="loading"], [data-state="refreshing"]) .status-dot { background: var(--blue); }
.provider-status:is([data-state="stale"], [data-state="unavailable"]) .status-dot { background: var(--warning); }
.provider-status .button, .draft-bar .button { min-height: 36px; padding: 6px 11px; }
.notice {
  margin-bottom: 16px;
  padding: 12px 15px;
  border: 1px solid var(--blue-line);
  border-radius: 7px;
  background: var(--blue-soft);
  color: var(--navy);
  font-size: 14px;
  overflow-wrap: anywhere;
}
.notice.error { border-color: #ecc7c2; background: var(--danger-soft); color: var(--danger); }

.directory {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  min-inline-size: 0;
}
.directory-toolbar, .directory-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 19px;
}
.views { display: flex; flex-wrap: wrap; gap: 3px; }
.view {
  min-height: 40px;
  padding: 9px 10px;
  border: 0;
  border-radius: 5px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 700;
}
.view[aria-pressed="true"], .view:hover { background: var(--blue-soft); color: var(--blue); }
.search-label { display: block; width: min(100%, 210px); }
.search-label input, .field input, .field select {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 45px;
  padding: 9px 12px;
  border: 1px solid var(--control-line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink);
}
.search-label input::placeholder, .field input::placeholder { color: var(--muted); opacity: 1; }
.table-scroll { overflow-x: auto; }
.table-scroll:focus-visible { outline-offset: -3px; }
table { width: 100%; min-width: 720px; border-collapse: collapse; table-layout: fixed; text-align: left; }
th, td { padding: 15px 19px; border-top: 1px solid var(--line); vertical-align: middle; }
th { background: #faf8f6; color: var(--navy); font-size: 12px; }
th:nth-child(1) { width: 18.2%; }
th:nth-child(2) { width: 14.9%; }
th:nth-child(3) { width: 17.3%; }
th:nth-child(4) { width: 21.5%; }
th:nth-child(5) { width: 14.1%; }
td { max-width: 16rem; font-size: 14px; overflow-wrap: anywhere; }
.name { display: block; font-weight: 700; }
.subline { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.feature-summary { display: flex; flex-wrap: wrap; column-gap: 8px; row-gap: 4px; }
.tag:is(.pending, .sms-enabled, .sms-status), .record-status {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--muted);
  background: #f2eeea;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
}
.tag.pending { background: var(--warning-soft); color: var(--warning); }
.tag.sms-enabled, .record-status.active { background: var(--success-soft); color: var(--success); }
.tag:is(.sms-enabled, .sms-status) { white-space: normal; }
.directory-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.empty { padding: 28px 19px; border-top: 1px solid var(--line); color: var(--muted); }
.draft-bar { margin-top: 15px; }

dialog {
  width: min(600px, 100% - 24px);
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 20px 60px #15275b44;
}
dialog::backdrop { background: #15275b80; }
dialog[open] { display: flex; flex-direction: column; }
.editor form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}
.dialog-heading, .dialog-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
}
.dialog-heading { justify-content: space-between; border-bottom: 1px solid var(--line); }
.dialog-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  background: var(--warm);
}
.dialog-body {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 14px 22px 18px;
}
.field {
  display: grid;
  gap: 4px;
  margin-bottom: 9px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
}
.field input, .field select { min-height: 37px; padding: 6px 10px; font-weight: 400; }
.field select:disabled { background: #f9f8f7; color: var(--muted); }
.field small, .feature small { color: var(--muted); font-size: 12px; font-weight: 400; }
.field small { padding-inline-start: 5px; }
.editor :is(input, select):focus-visible { outline-width: 2px; outline-offset: 2px; }
.form-section { min-inline-size: 0; margin: 13px 0 0; padding: 4px 0 0; border: 0; border-top: 1px solid var(--line); }
.form-section legend { padding-inline: 0 10px; color: var(--navy); font-weight: 750; }
.field-help { margin: 2px 0 8px; color: var(--muted); font-size: 13px; }
.suggestion { min-height: 30px; padding: 4px 0; margin: -5px 0 8px; text-align: left; font-size: 13px; }
.feature { display: flex; align-items: flex-start; gap: 8px; padding-block: 4px; font-size: 13px; }
.feature input { flex: 0 0 16px; width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--blue); }
.feature small { display: block; }
.review-dialog .dialog-body { padding-block: 24px; }
.change-list { margin: 18px 0 0; padding-inline-start: 20px; }
.change-list:empty { margin: 0; }
.change-list li { padding-block: 3px; overflow-wrap: anywhere; }
.change-list li + li { margin-top: 8px; }
.review-dialog .notice { margin: 14px 0 0; }

@media (max-width: 700px) {
  .masthead-content, .workspace { width: calc(100% - 40px); }
  .masthead-content { min-height: 69px; gap: 10px; }
  .brand { gap: 10px; }
  .brand-logo { width: 105px; }
  .brand-label { padding-inline-start: 10px; }
  .welcome-content { grid-template-columns: 1fr; min-height: 0; gap: 30px; padding-block: 36px; }
  .welcome-art { min-height: 175px; }
  .welcome-footer { margin-inline: 0; padding-inline: 0; }
  .directory-workspace { padding-block: 30px; }
  .page-heading { align-items: start; flex-direction: column; gap: 16px; }
  .search-label { width: 100%; }
  .provider-status, .draft-bar { flex-wrap: wrap; }
}

@media (max-width: 420px) {
  .masthead-content, .workspace { width: calc(100% - 32px); }
  .brand-logo { width: 92px; }
  .brand-label { font-size: 12px; }
  .session .button { padding-inline: 10px; }
  .directory-toolbar, .directory-footer, .provider-status, .draft-bar { padding-inline: 13px; }
  .dialog-heading, .dialog-actions, .dialog-body { padding-inline: 15px; }
  .dialog-actions .button { padding-inline: 12px; }
}
