@font-face {
  font-family: Outfit;
  src: url(brand/fonts/outfit-400.woff2) format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Outfit;
  src: url(brand/fonts/outfit-600.woff2) format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url(brand/fonts/ibm-plex-mono-400.woff2) format("woff2");
  font-display: swap;
}
:root {
  color-scheme: dark;
  --canvas: #0a0a0a;
  --surface: #111;
  --raised: #1a1a1a;
  --line: #2a2a2a;
  --blue: #0055ff;
  --text: #f0f0f0;
  --muted: #a5a5ae;
  --danger: #ff9f9f;
  font-family: Outfit, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  background: var(--canvas);
  color: var(--text);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
button,
input,
a {
  -webkit-tap-highlight-color: transparent;
}
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 44px;
  border: 1px solid #444;
  border-radius: 8px;
  padding: 0.6rem 1rem;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
button:hover,
.button:hover {
  background: var(--raised);
  border-color: #777;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}
.primary:hover {
  background: #0648d7;
}
.danger {
  color: var(--danger);
}
:focus-visible {
  outline: 3px solid #80adff;
  outline-offset: 4px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 2.65rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.035em;
}
h2 {
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.4;
}
h3 {
  font-size: 1rem;
  font-weight: 600;
}
p {
  color: var(--muted);
}
.handle {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}
.eyebrow {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 1rem;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.wordmark img {
  display: block;
  width: 184px;
  height: 56px;
}
.sidebar .wordmark img {
  width: 138px;
  height: 42px;
}
.skip {
  position: absolute;
  left: 1rem;
  top: -5rem;
  padding: 1rem;
  background: var(--blue);
  z-index: 5;
}
.skip:focus {
  top: 1rem;
}
.account-shell {
  display: grid;
  grid-template-columns: 255px minmax(0, 1fr);
  max-width: 1500px;
  min-height: 100dvh;
  margin: auto;
}
.sidebar {
  padding: 2.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  border-right: 1px solid var(--line);
}
.account-anchor {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.account-anchor strong,
.account-anchor .handle {
  display: block;
}
.account-anchor .handle {
  color: var(--muted);
  font-size: 0.7rem;
}
.avatar {
  display: grid;
  place-items: center;
  background: #16264b;
  color: #91b5ff;
  border: 1px solid #274171;
  border-radius: 10px;
  width: 42px;
  height: 42px;
  font-size: 1.1rem;
}
.sidebar nav {
  display: grid;
  gap: 0.35rem;
}
.sidebar nav a {
  padding: 0.75rem 0.85rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.88rem;
  color: var(--muted);
}
.sidebar nav a[aria-current] {
  background: #15203a;
  color: #bcd2ff;
}
.sidebar nav a:hover {
  color: white;
  background: var(--raised);
}
.signout {
  margin-top: auto;
}
.signout button {
  width: 100%;
}
.settings {
  padding: 3rem clamp(1.5rem, 5vw, 5.5rem);
  min-width: 0;
  max-width: 1130px;
}
.settings header {
  margin-bottom: 2.5rem;
}
.identity-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
  border: 1px solid #254784;
  background: linear-gradient(112deg, #14284e, #111925);
  border-radius: 14px;
  margin-bottom: 1.5rem;
  gap: 1.5rem;
}
.identity-person {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}
.identity-name {
  min-width: 0;
  min-height: 96px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.avatar-editor {
  position: relative;
  flex: 0 0 96px;
  padding-bottom: 52px;
  /* This continuous hover area bridges the circle and its separate action. */
}
.avatar-upload,
.avatar-delete {
  margin: 0;
}
.avatar-picker {
  position: relative;
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  padding: 0;
  border: 1px solid #426498;
  border-radius: 50%;
  overflow: hidden;
  background: #1b3155;
  color: #b8c9e6;
}
.avatar-picker img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-placeholder {
  width: 40px;
  height: 40px;
}
.avatar-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgb(0 0 0 / 60%);
  color: white;
  opacity: 0;
  transition: opacity 140ms ease;
}
.avatar-overlay svg {
  width: 28px;
  height: 28px;
}
.avatar-delete {
  position: absolute;
  top: 96px;
  left: 0;
  width: 100%;
  padding-top: 8px;
  display: flex;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease;
}
.avatar-delete-button {
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--danger);
  border-color: #59404a;
  background: #251b24;
}
.avatar-delete-button:hover {
  background: #3a2028;
  border-color: var(--danger);
}
.avatar-delete-button svg {
  width: 20px;
  height: 20px;
}
.avatar-editor:hover .avatar-overlay,
.avatar-editor:focus-within .avatar-overlay,
.avatar-editor:hover .avatar-delete,
.avatar-editor:focus-within .avatar-delete {
  opacity: 1;
  pointer-events: auto;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
@media (hover: none), (pointer: coarse) {
  .avatar-delete {
    opacity: 1;
    pointer-events: auto;
  }
  .avatar-overlay {
    opacity: 1;
    inset: auto 0 0;
    height: 32px;
  }
  .avatar-overlay svg {
    width: 20px;
    height: 20px;
  }
}
.identity-strip .eyebrow {
  color: #99b9f4;
  margin-bottom: 0.6rem;
}
.identity-strip h2 {
  font-size: 1.7rem;
  margin-bottom: 0.4rem;
}
.identity-strip .handle {
  color: #b8c9e6;
}
.identity-mark {
  font-size: 3.5rem;
  font-weight: 600;
  letter-spacing: -0.1em;
  color: #6e96dc;
  opacity: 0.6;
}
.panel {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 1.2rem;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.panel-heading p,
.row p {
  font-size: 0.9rem;
  margin-top: 0.3rem;
}
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.row:first-child {
  padding-top: 0;
}
.row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 0;
}
.details dt {
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 0.3rem;
}
.details dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.inline-action {
  margin: 0;
}
.status-label {
  display: inline-block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.66rem;
  color: #b7cbee;
  padding: 0.28rem 0.5rem;
  background: #172238;
  border-radius: 4px;
  white-space: nowrap;
}
.footnote {
  font-size: 0.78rem;
  margin-top: 1rem;
}
.empty {
  padding: 1rem 0 1.5rem;
}
.section-intro {
  margin-bottom: 1.5rem;
  max-width: 37rem;
}
.notice {
  padding: 1rem 1.2rem;
  border: 1px solid #2b6148;
  color: #b7e1cb;
  background: #12241c;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}
.pending {
  border-color: #665525;
  background: #282310;
  color: #f0d99b;
}
.document-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding: 1rem 0;
}
.document-row span {
  color: var(--muted);
  font-size: 0.75rem;
}
.service-actions {
  margin-top: 1.5rem;
}
.session-agent {
  max-width: 420px;
  font-size: 0.8rem !important;
  overflow-wrap: anywhere;
}
.welcome,
.message {
  max-width: 680px;
  margin: 0 auto;
  padding: 12vh 2rem 3rem;
}
.welcome .wordmark,
.message .wordmark {
  margin-bottom: 5rem;
}
.welcome h1 {
  font-size: clamp(3rem, 8vw, 5rem);
}
.lead {
  font-size: 1.15rem;
  max-width: 490px;
  margin: 1.5rem 0 2rem;
}
.text-link {
  display: inline-block;
  margin: 1rem 1.5rem;
  font-size: 0.95rem;
}
.welcome-footer {
  border-top: 1px solid var(--line);
  margin-top: 6rem;
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--muted);
}
[hidden] {
  display: none !important;
}
@media (max-width: 800px) {
  .account-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    padding: 1.2rem 1.4rem;
    gap: 1.2rem;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: 1fr auto;
  }
  .account-anchor {
    display: none;
  }
  .sidebar nav {
    grid-column: 1/-1;
    grid-row: 2;
    display: flex;
    overflow: auto;
    gap: 0.4rem;
    margin: 0 -0.5rem;
  }
  .sidebar nav a {
    white-space: nowrap;
    padding: 0.75rem;
  }
  .signout {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
  }
  .signout button {
    border: 0;
    padding: 0.5rem;
  }
  .settings {
    padding: 2rem 1.4rem;
  }
  .settings h1 {
    font-size: 2.1rem;
  }
  .settings header {
    margin-bottom: 1.7rem;
  }
  .panel {
    padding: 1.2rem;
  }
  .identity-strip {
    padding: 1.25rem;
    gap: 1rem;
  }
  .identity-person {
    gap: 1rem;
  }
  .avatar-editor {
    flex-basis: 80px;
  }
  .avatar-picker {
    width: 80px;
    height: 80px;
  }
  .avatar-delete {
    top: 80px;
  }
  .identity-name {
    min-height: 80px;
  }
  .identity-mark {
    display: none;
  }
  .row {
    flex-wrap: wrap;
  }
  .panel-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .credential .actions {
    width: 100%;
  }
  .section-intro {
    margin-bottom: 1rem;
  }
  .document-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.3rem;
  }
}
@media (max-width: 400px) {
  .details {
    grid-template-columns: 1fr;
  }
  .settings {
    padding: 1.6rem 1rem;
  }
  .welcome,
  .message {
    padding: 8vh 1.4rem 2rem;
  }
  .welcome-footer {
    flex-direction: column;
    gap: 0.5rem;
  }
  .identity-strip h2 {
    font-size: 1.4rem;
  }
  .identity-mark {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}

.admin-settings {
  max-width: 920px;
  margin: 0 auto;
}
.admin-settings form p {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
}
.admin-settings input:not([type="checkbox"]),
.admin-settings select {
  width: 100%;
  padding: 12px;
  border: 1px solid #444;
  border-radius: 4px;
  color: #f0f0f0;
  background: #111;
  font: inherit;
}
.admin-settings input[type="checkbox"] {
  justify-self: start;
  width: 20px;
  height: 20px;
}
.errorlist {
  color: #ffb8b8;
  padding-left: 20px;
}
.row > div,
.panel-heading > div,
.identity-strip > div,
.account-anchor > div {
  min-width: 0;
}
.identity-strip h2,
.account-anchor strong,
.details dd,
.row h3,
.row p {
  overflow-wrap: anywhere;
}

.avatar img { width:100%; height:100%; object-fit:cover; border-radius:inherit; }
input[type="file"] { display:block; width:100%; margin:1rem 0; }
