/* Palette. The theme is chosen per environment with DCS_THEME (light|dark),
   rendered as data-theme on <html>. Every color below is a variable so the
   dark block only has to override tokens, not components. */
:root,
[data-theme="light"] {
  color-scheme: light;
  --navy: #0b1f3a;
  --navy-2: #14305a;
  --blue: #1d4f91;
  --bg: #f3f5f8;
  --card: #ffffff;
  --text: #1b2430;
  --muted: #5a6677;
  --border: #d5dbe4;
  --input-bg: #ffffff;
  --input-border: #aab4c3;
  --header-bg: var(--navy);
  --header-hover: var(--navy-2);
  --heading: var(--navy);
  --link: var(--blue);
  --btn-bg: var(--blue);
  --btn-hover: var(--navy-2);
  --btn-fg: #ffffff;
  --btn-secondary-bg: #ffffff;
  --btn-secondary-hover: #e8eef7;
  --btn-disabled-bg: #e9edf2;
  --btn-disabled-fg: #8a94a3;
  --thead-bg: #e8edf4;
  --row-hover: #f7f9fc;
  --shadow: rgba(11, 31, 58, .06);
  --focus: #f2b705;
  --footer-bg: var(--navy);
  --footer-fg: #c8d2e0;
  --radius: 8px;
}
[data-theme="dark"] {
  color-scheme: dark;
  --navy: #0a1322;
  --navy-2: #182a47;
  --blue: #6ea8ff;
  --bg: #0f1623;
  --card: #182131;
  --text: #e6ebf2;
  --muted: #9aa7ba;
  --border: #2b3648;
  --input-bg: #0f1623;
  --input-border: #3a4860;
  --header-bg: #070d18;
  --header-hover: #182a47;
  --heading: #ffffff;
  --link: #8db8ff;
  --btn-bg: #2f6fd6;
  --btn-hover: #3f82ec;
  --btn-fg: #ffffff;
  --btn-secondary-bg: #182131;
  --btn-secondary-hover: #223049;
  --btn-disabled-bg: #1d2636;
  --btn-disabled-fg: #6b7789;
  --thead-bg: #1d2838;
  --row-hover: #1f2a3c;
  --shadow: rgba(0, 0, 0, .45);
  --focus: #ffcf40;
  --footer-bg: #070d18;
  --footer-fg: #9aa7ba;
}
* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; padding-top: 1.5rem; padding-bottom: 2.5rem; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 1rem; }
a { color: var(--link); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.skip-link { position: absolute; left: -999px; top: 0; background: var(--card); color: var(--text); padding: .5rem 1rem; z-index: 10; }
.skip-link:focus { left: 0; }

.env-banner {
  text-align: center;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .6rem 1rem;
  font-size: .95rem;
}
.site-header { background: var(--header-bg); color: #fff; border-bottom: 4px solid var(--blue); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: .9rem; padding-bottom: .9rem; }
.brand { display: flex; align-items: center; gap: .8rem; color: #fff; text-decoration: none; }
.brand-logo { width: 2.6rem; height: 2.6rem; display: block; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-agency { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; opacity: .85; }
.brand-app { font-size: 1.2rem; font-weight: 700; }
.site-header nav a { color: #fff; text-decoration: none; padding: .4rem .8rem; border-radius: 4px; }
.site-header nav a:hover { background: var(--header-hover); }

h1 { font-size: 1.7rem; margin: 0 0 1rem; color: var(--heading); }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 1px 2px var(--shadow); }

.filters { display: flex; flex-wrap: wrap; gap: 1rem; padding: 1rem; margin-bottom: 1rem; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: .25rem; min-width: 12rem; }
.field--grow { flex: 1 1 16rem; }
.field--actions { flex-direction: row; gap: .5rem; min-width: 0; }
label { font-size: .85rem; font-weight: 600; color: var(--muted); }
input[type="search"], select {
  font: inherit; padding: .5rem .6rem; border: 1px solid var(--input-border); border-radius: 6px; background: var(--input-bg); color: var(--text); width: 100%;
}
.btn {
  display: inline-block; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; text-align: center;
  background: var(--btn-bg); color: var(--btn-fg); border: 1px solid var(--btn-bg); border-radius: 6px; padding: .5rem 1rem;
}
.btn:hover { background: var(--btn-hover); }
.btn--secondary { background: var(--btn-secondary-bg); color: var(--link); }
.btn--secondary:hover { background: var(--btn-secondary-hover); }
.btn--disabled { background: var(--btn-disabled-bg); color: var(--btn-disabled-fg); border-color: var(--border); cursor: not-allowed; }

.result-count { color: var(--muted); margin: .5rem 0; font-size: .92rem; }
.table-wrap { overflow-x: auto; }
table.directory { width: 100%; border-collapse: collapse; }
.directory th { text-align: left; background: var(--thead-bg); color: var(--heading); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; padding: .7rem .9rem; }
.directory td { padding: .7rem .9rem; border-top: 1px solid var(--border); vertical-align: middle; }
.directory tbody tr:hover { background: var(--row-hover); }
.person { display: flex; align-items: center; gap: .7rem; font-weight: 600; text-decoration: none; }
.person:hover span:last-child { text-decoration: underline; }
.designation { display: block; font-size: .78rem; font-weight: 600; letter-spacing: .03em; color: var(--muted); }
.empty { padding: 2rem; text-align: center; color: var(--muted); }

.avatar {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 2.4rem; height: 2.4rem; border-radius: 50%; color: #fff; font-weight: 700; font-size: .9rem; letter-spacing: .03em;
}
.avatar--lg { width: 5rem; height: 5rem; font-size: 1.8rem; }
.avatar--0 { background: #1d4f91; }
.avatar--1 { background: #2e6f4e; }
.avatar--2 { background: #7a3e8e; }
.avatar--3 { background: #a4511c; }
.avatar--4 { background: #136f7a; }
.avatar--5 { background: #8a2a3b; }
.avatar--6 { background: #4a5a8a; }
.avatar--7 { background: #5f6b2a; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1.25rem; flex-wrap: wrap; }
.page-status { color: var(--muted); font-weight: 600; }

.breadcrumb { margin: 0 0 1rem; }
.profile { padding: 1.5rem; }
.profile-head { display: flex; align-items: center; gap: 1.25rem; margin-bottom: 1.25rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--border); }
.profile-head h1 { margin: 0; }
.profile-title { margin: .1rem 0 0; font-weight: 600; }
.profile-dept { margin: 0; color: var(--muted); }
.details { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem 1.5rem; margin: 0; }
.details dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.details dd { margin: .1rem 0 0; overflow-wrap: anywhere; }

.message { padding: 2.5rem 1.5rem; text-align: center; }
.message-code { font-size: 3.5rem; font-weight: 800; color: var(--link); margin: 0; line-height: 1; }

.site-footer { background: var(--footer-bg); color: var(--footer-fg); font-size: .85rem; padding: 1rem 0; text-align: center; }

@media (max-width: 760px) {
  .brand-agency { display: none; }
  .field { min-width: 100%; }
  .field--actions { width: 100%; }
  .field--actions .btn { flex: 1; }
  .table-wrap { border: 0; box-shadow: none; background: transparent; }
  table.directory, .directory tbody, .directory tr, .directory td { display: block; width: 100%; }
  .directory thead { position: absolute; left: -9999px; }
  .directory tr { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: .8rem; padding: .4rem 0; }
  .directory td { border: 0; padding: .35rem .9rem; overflow-wrap: anywhere; }
  .directory td[data-label]::before { content: attr(data-label); display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
  .profile-head { flex-direction: column; text-align: center; }
}
