:root {
  color-scheme: light;
  --bg: #f3f5f8;
  --surface: #fff;
  --raised: #f8fafd;
  --ink: #15283e;
  --muted: #50647e;
  --line: #dce4ee;
  --control-line: #899bb0;
  --nav: #142236;
  --nav-text: #b6c4d7;
  --accent: #2163d7;
  --accent-hover: #194fb0;
  --accent-soft: #eaf1ff;
  --good: #166047;
  --good-bg: #edf8f2;
  --bad: #9b2e2a;
  --bad-bg: #fff1ef;
  --radius: 8px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
  background: var(--bg);
  color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 0; }
h1, h2, p, dl, dd { margin: 0; }
[hidden] { display: none !important; }
::selection { background: #d9e6ff; color: #11335e; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.masthead :focus-visible, .skip:focus-visible { outline-color: #a2c7ff; }

.sr-only, .skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip:focus {
  position: fixed;
  top: 8px;
  left: 12px;
  z-index: 1;
  padding: 10px 16px;
  background: var(--nav);
  color: white;
  border-radius: var(--radius);
}

.shell { min-height: 100vh; min-height: 100dvh; }
.masthead { background: var(--nav); color: #fff; }
.masthead-inner {
  min-height: 68px;
  max-width: 1328px;
  margin-inline: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem 1.5rem;
  padding: .75rem 2rem;
}
.wordmark { display: flex; align-items: center; gap: .75rem; font-size: 1.125rem; }
.wordmark img { flex: none; display: block; }
.wordmark span { min-width: 0; }
.wordmark strong { font-weight: 650; }
.account-tools { display: flex; align-items: center; justify-content: end; gap: .5rem 1rem; }
#account-label { color: var(--nav-text); font-size: .875rem; overflow-wrap: anywhere; }
.account-tools button { flex: none; }
.account-tools .button-quiet { color: #fff; background: transparent; border-color: #617592; }
.account-tools .button-quiet:hover { background: #243b59; }

h1 { font-size: 2rem; font-weight: 650; line-height: 1.17; letter-spacing: -.028em; }
h2 { font-size: 1.125rem; font-weight: 650; line-height: 1.3; letter-spacing: -.012em; }
.subtitle { margin-top: .6rem; max-width: 45ch; color: var(--muted); }
.hint { font-size: .875rem; color: var(--muted); }

.auth-layout {
  display: grid;
  grid-template-columns: minmax(300px, 36%) minmax(0, 1fr);
  min-height: calc(100vh - 68px);
  min-height: calc(100dvh - 68px);
  background: var(--surface);
}
.auth-side {
  display: flex;
  align-items: center;
  padding: 2.5rem 2.5rem 3.5rem max(2rem, calc((100vw - 1264px) / 2));
  background: #192c47;
  color: var(--nav-text);
}
.auth-side-inner { width: min(100%, 22rem); }
.auth-side h2 {
  color: #fff;
  font-size: 2.25rem;
  line-height: 1.08;
  letter-spacing: -.034em;
  text-wrap: balance;
}
.auth-side h2 + p { margin-top: 1rem; }
.auth-side-note {
  display: flex;
  align-items: start;
  gap: .75rem;
  padding: 1.25rem 0 0;
  margin-top: 2rem;
  border-top: 1px solid #405674;
  font-size: .875rem;
}
.auth-side-note svg { flex: none; width: 1.25rem; height: 1.25rem; stroke: #a2c7ff; stroke-width: 1.65; }
.auth-content {
  display: grid;
  align-content: center;
  padding: 3.25rem max(2rem, 8vw);
}
.auth-view { width: min(100%, 420px); }
.auth-view form, .auth-view > .feedback { margin-top: 1.5rem; }
.auth-view .link-button { margin-top: 1rem; }

.form { display: grid; gap: 1rem; min-width: 0; }
.field { display: grid; gap: .35rem; min-width: 0; }
label { font-size: .875rem; font-weight: 600; }
button, input, select { font: inherit; }
input, select {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  border: 1px solid var(--control-line);
  border-radius: 6px;
  padding: .625rem .75rem;
  background-color: var(--surface);
  color: var(--ink);
  caret-color: var(--accent);
}
input[aria-invalid="true"] { border-color: var(--bad); }
.button {
  min-height: 44px;
  padding: .625rem .875rem;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 600;
  font-size: .9375rem;
  text-align: center;
  cursor: pointer;
}
.button-primary { background: var(--accent); color: #fff; }
.button-primary:hover { background: var(--accent-hover); }
.button-primary:active { background: #153d83; }
.button-quiet { background: var(--surface); color: var(--ink); border-color: var(--control-line); }
.button-quiet:hover { background: var(--raised); }
button:disabled { opacity: .62; cursor: wait; }
.link-button {
  min-height: 44px;
  padding: .5rem 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--accent-hover);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: .19em;
}

.feedback { padding: .625rem .75rem; border-radius: 6px; font-size: .875rem; overflow-wrap: anywhere; }
.feedback.success { background: var(--good-bg); color: var(--good); }
.feedback.error { background: var(--bad-bg); color: var(--bad); }
.workspace { max-width: 1328px; margin-inline: auto; padding: 2.25rem 2rem 3rem; }
.page-heading { margin-bottom: 1.5rem; }
.account-heading { display: flex; align-items: start; justify-content: space-between; flex-wrap: wrap; gap: .75rem 1rem; }
.team-grid { display: grid; grid-template-columns: minmax(270px, .88fr) minmax(0, 1.75fr); align-items: start; gap: 1.25rem; }
.panel { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-heading { padding: 1rem 1.125rem; border-bottom: 1px solid var(--line); }
.panel-heading .hint { margin-top: .35rem; }
.panel-form { padding: 1.125rem; }
.directory-heading { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: .75rem; }
.directory-status { padding: 1.125rem; color: var(--muted); overflow-wrap: anywhere; }
.directory-status:empty { display: none; }
table { width: 100%; border-collapse: collapse; text-align: left; table-layout: fixed; }
th, td { padding: .75rem 1.125rem; overflow-wrap: anywhere; }
th { background: var(--raised); color: var(--muted); font-size: .875rem; font-weight: 600; }
th:last-child { width: 32%; }
td { border-top: 1px solid var(--line); vertical-align: middle; font-size: .9375rem; }
td strong { display: block; font-weight: 600; }
td small { display: block; color: var(--muted); font-size: .875rem; }
.profile-view { max-width: 38rem; }
.profile-view > .panel + .panel { margin-top: 1rem; }
.profile-panel { padding: 1rem 1.25rem; }
.profile-panel dl div { padding-block: .875rem; overflow-wrap: anywhere; }
.profile-panel dl div:first-child { padding-top: 0; }
.profile-panel dl div:last-child { padding-bottom: 0; }
.profile-panel dl div + div { border-top: 1px solid var(--line); }
.profile-panel dt { color: var(--muted); font-size: .875rem; }
.profile-panel dd { margin-top: .25rem; font-weight: 600; }
.workspace-feedback { margin-top: 1rem; }

@media (max-width: 820px) {
  .auth-content { padding-inline: 2rem; }
  .auth-side { padding-inline: 2rem; }
  .team-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .masthead-inner { padding-inline: 1rem; flex-wrap: wrap; }
  .wordmark { font-size: 1rem; }
  .account-tools { margin-left: auto; }
  #account-label { display: none; }
  .auth-layout { display: flex; flex-direction: column; min-height: calc(100dvh - 68px); }
  .auth-side { order: 2; margin-top: auto; padding: 1.375rem 1rem; }
  .auth-side-inner { width: 100%; }
  .auth-side h2, .auth-side h2 + p { display: none; }
  .auth-side-note { border: 0; margin: 0; padding: 0; }
  .auth-content { padding: 2rem 1rem 2.5rem; }
  h1 { font-size: 1.75rem; }
  .workspace { padding: 1.75rem 1rem 2rem; }
  th, td { padding-inline: .75rem; }
  th:last-child { width: 9.5rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .button, .link-button { transition: color 150ms ease-out, background-color 150ms ease-out, border-color 150ms ease-out; }
}
