:root {
  color-scheme: light;
  --ink: #251f35;
  --muted: #625a70;
  --accent: #6542ab;
  --deep: #50318b;
  --soft: #f1ebfa;
  --line: #e2dcea;
  --dropdown-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23625a70' stroke-width='1.7'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  --dropdown-end-space: 2.3rem;
  --focus-ring: 3px solid #7652b4;
  --input-line: #b8aec6;
  --paper: #fff;
  --radius: 18px;
  --side: 15.125rem;
  --shadow: 0 4px 18px rgb(51 34 71 / 4%);
  font: 100%/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #f7f4fa;
}
@media (min-width:801px) {
  :root { font-size:87.5%; --radius:16px; }
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(ellipse at 88% 0, #e5dff8, transparent 42rem), linear-gradient(145deg,#f1e5f3 0,#f6f2fa 48rem,#f6f5f9 100%); }
[hidden] { display: none !important; }
h1,h2,h3,p,figure,fieldset { margin: 0; }
h1 { font-size: clamp(1.8rem,3vw,2.6rem); font-weight: 690; letter-spacing: -.055em; line-height: 1.13; margin: .35rem 0 1.4rem; overflow-wrap: anywhere; }
h2 { font-size: 1.15rem; line-height: 1.35; letter-spacing: -.024em; margin-bottom: 1rem; }
h3 { font-size: 1rem; line-height: 1.4; }
p { margin: .7rem 0; }
a { color: var(--deep); text-underline-offset: .17em; }
a:hover { color: #402079; }
button,.button {
  display: inline-flex; gap: .46rem; align-items: center; justify-content: center; min-height: 2.5rem; padding: .56rem .95rem;
  border: 1px solid transparent; border-radius: 10px; background: var(--accent); color: white;
  font-family: inherit; font-size: .9rem; line-height: 1.35; font-weight: 600;
  text-decoration: none; cursor: pointer;
}
button:hover,.button:hover { background: var(--deep); color: white; }
.quiet { background: #fff; color: var(--ink); border-color: var(--line); }
.quiet:hover { color: var(--deep); background: #f7f3fb; border-color: #c4b3d8; }
:focus-visible { outline: var(--focus-ring); outline-offset: 3px; }
.icon { width: 1.125rem; height: 1.125rem; flex: 0 0 auto; vertical-align: -.18em; }
.sr-only,.skip-link:not(:focus) { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.skip-link:focus { position:fixed; z-index:10; left:1rem; top:1rem; background:white; padding:.6rem 1rem; }
.sidebar { position:fixed; inset:0 auto 0 0; z-index:3; width:var(--side); padding:1.35rem .85rem .9rem; overflow:auto; scrollbar-width:thin; background:linear-gradient(165deg,#f0e7f5,#f7f1fa 68%,#f3edf7); border-right:1px solid #dfd5e6; }
.brand,.brand-row,.identity,.agency,.actions,.dashboard-head,.page-heading,.toolbar,.widget-heading,.activity,.stage-row { display:flex; align-items:center; }
.brand { flex-direction:column; align-items:flex-start; gap:.25rem; text-decoration:none; color:var(--ink); margin:0 .65rem; }
.wordmark { display:block; width:108px; height:31px; max-width:100%; object-fit:contain; object-position:left center; }
.brand-name { font-size:.78rem; letter-spacing:-.015em; line-height:1.3; font-weight:550; color:#51455e; }
.sidebar nav { margin:1.25rem 0 1rem; }
.nav-label { margin:1.25rem .68rem .4rem; font-size:.75rem; font-weight:650; color:var(--muted); letter-spacing:.035em; }
.sidebar nav a,.nav-more summary,.logout button {
  display:flex; align-items:center; gap:.7rem; padding:.48rem .65rem; border-radius:8px; font-size:.88rem;
  line-height:1.35; text-decoration:none; color:#443b52; font-weight:500;
}
.sidebar nav a:hover,.nav-more summary:hover { color:var(--deep); background:#eae2f1; }
.sidebar nav a[aria-current] { background:#e6d7f4; color:#4a267a; font-weight:700; }
.nav-more { margin:0; }
.nav-more summary { list-style:none; }
.nav-more summary::-webkit-details-marker { display:none; }
.nav-more summary .icon:last-child { margin-left:auto; width:.9rem; }
.nav-more[open] summary .icon:last-child { transform:rotate(180deg); }
.nav-more a { margin-left:.68rem; }
.logout { padding-top:.75rem; border-top:1px solid var(--line); }
.logout button { background:transparent; border:0; }
.mobile-toggle { display:none; }
.workspace { margin-left:var(--side); min-height:100vh; }
.topbar { min-height:4rem; display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:.7rem clamp(1.2rem,3.8vw,4rem); border-bottom:1px solid rgb(81 62 110 / 10%); }
.agency { gap:.55rem; font-weight:620; font-size:.9rem; }
.identity { gap:.65rem; color:var(--muted); font-size:.81rem; }
.env,.badge { display:inline-flex; align-items:center; padding:.2rem .56rem; border-radius:100px; font-size:.76rem; font-weight:600; color:#563879; background:#f0e9f6; }
.env { background:rgba(255,255,255,.58); border:1px solid #ddd2e8; }
.avatar { width:2rem; height:2rem; display:grid; place-items:center; border-radius:50%; background:#dacbec; color:#55377a; font-weight:700; }
.page-content,footer { width:min(100%,1560px); margin-inline:auto; padding-inline:clamp(1.2rem,3.8vw,4rem); }
.page-content { padding-block:clamp(1.45rem,3vw,3rem) 1rem; }
footer { padding-block:2rem; color:var(--muted); font-size:.76rem; }
.auth { max-width:38rem; margin:auto; padding:clamp(1rem,5vw,4rem) .6rem; }
.auth .topbar,.auth .page-content,.auth footer { padding-inline:1rem; }
.auth img { max-width:100%; }
.muted,.today,small,.helptext { color:var(--muted); }
small,.helptext { font-size:.81rem; }
.today { font-size:.9rem; margin:0 0 .3rem; }
.dashboard-head,.page-heading,.toolbar { justify-content:space-between; flex-wrap:wrap; gap:1rem; margin:0 0 1.5rem; }
.dashboard-head h1,.page-heading h1,.toolbar h1 { margin:0; }
.actions,.toolbar form { display:flex; gap:.6rem; align-items:center; flex-wrap:wrap; }
.grid,.dashboard-grid { display:grid; gap:1.1rem; }
.grid { grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr)); }
.dashboard-grid { grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; }
.card,.page-content section,.form-section { min-width:0; background:var(--paper); border:1px solid var(--line); border-radius:var(--radius); padding:clamp(1rem,2vw,1.6rem); margin:1rem 0; box-shadow:var(--shadow); }
.page-content .widget { margin:0; }
.widget.full { grid-column:1 / -1; }
.widget-heading { justify-content:space-between; gap:.6rem; margin:0 0 1rem; }
.widget-heading h2 { display:flex; align-items:center; gap:.65rem; margin:0; }
.icon-tile,.activity-icon { display:inline-grid; place-items:center; flex:0 0 auto; border-radius:10px; color:var(--accent); }
.icon-tile { width:2.25rem; height:2.25rem; background:var(--soft); }
.widget-controls { display:flex; align-items:center; color:var(--muted); }
.icon-button,.drag-handle { display:inline-grid; place-items:center; width:28px; height:32px; min-height:0; padding:0; color:var(--muted); background:transparent; border:0; border-radius:5px; }
.icon-button .icon { width:1rem; }
.icon-button:hover { background:var(--soft); color:var(--deep); }
.icon-button:disabled { opacity:.32; cursor:default; }
.drag-handle { cursor:grab; }
.dragging { opacity:.55; }
.drop-target { outline:2px dashed var(--accent); outline-offset:2px; }
.stat-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,125px),1fr)); gap:.65rem; }
.stat { padding:.85rem .95rem; display:flex; flex-direction:column; border-radius:12px; background:#f7f4fa; color:var(--ink); text-decoration:none; }
.stat:hover { background:#eee7f5; }
.stat span { font-size:.88rem; font-weight:560; color:var(--muted); }
.stat strong,.metric { font-size:1.95rem; line-height:1.2; font-weight:670; letter-spacing:-.05em; font-variant-numeric:tabular-nums; }
.stat small { margin-top:.2rem; }
.activity,.row,.stage-row { padding:.7rem 0; border-top:1px solid #eeeaf1; }
.activity { gap:.7rem; }
.activity div { min-width:0; overflow-wrap:anywhere; }
.activity-icon { width:2.1rem; height:2.1rem; background:#f5f1f8; }
.activity a,.row a,.table-panel td:first-child a { color:var(--ink); font-weight:600; text-decoration:none; }
.activity a:hover,.row a:hover,.table-panel td:first-child a:hover { color:var(--deep); text-decoration:underline; }
.activity small { display:block; }
.stage-row { justify-content:space-between; gap:1rem; }
.widget-link,.breadcrumb { font-size:.875rem; font-weight:600; }
.widget-link { display:inline-block; margin-top:.7rem; }
.breadcrumb { display:inline-block; margin:0 0 .55rem; }
.empty { padding:1rem 0; margin:0; color:var(--muted); }
.grid>.card { margin:0; }
a.card { color:var(--ink); text-decoration:none; }
input,select,textarea { display:block; width:100%; min-width:0; min-height:2.5rem; margin:.3rem 0 .8rem; padding:.55rem .72rem; font:inherit; font-size:.94rem; line-height:1.45; color:var(--ink); background-color:white; border:1px solid var(--input-line); border-radius:8px; }
select:not([multiple]), .mandate-search input, [data-value-catalog] > :is(input,textarea) {
  padding-inline-end:var(--dropdown-end-space);
  background-image:var(--dropdown-chevron);
  background-repeat:no-repeat;
  background-size:1rem 1rem;
  background-position:right .65rem center;
}
select:not([multiple]) { appearance:none; }
input[type=checkbox],input[type=radio] { display:inline-block; width:1.05rem; min-height:0; height:1.05rem; margin:.3rem .45rem .3rem 0; vertical-align:middle; accent-color:var(--accent); }
input[type=hidden] { display:none; }
textarea { resize:vertical; min-height:6rem; }
label { font-size:.9rem; font-weight:560; }
.page-content section>form:not(.search-form),.page-content details>form { max-width:62rem; }
.record-form { width:100%; }
.form-section { padding-top:.85rem; margin:1.4rem 0; }
.form-section legend { padding:0 .45rem; margin-left:-.45rem; color:#493263; font-size:1.05rem; font-weight:680; }
.field-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:1.45rem; row-gap:1rem; }
.field { min-width:0; }
.field :is(input,select,textarea) { margin-bottom:0; }
.field label,.field small { display:block; }
.instance-address { overflow-wrap:anywhere; }
.instance-address-entry { display:flex; align-items:center; gap:.3rem; }
.instance-address-entry input { min-width:0; flex:1; }
.field-wide { grid-column:1/-1; }
.field-error :is(input,select,textarea) { border-color:#a9384b; }
.errorlist,.error,.notice { padding:.65rem 1rem; border-radius:8px; }
.errorlist,.error { color:#8d2639; background:#fff0f2; }
.errorlist { list-style:none; margin:.4rem 0; }
.notice { background:#e9f3ee; color:#2c5944; }
.form-actions { margin:1rem 0; }
.page-content details:not(.nav-more) { padding:.75rem 0; }
summary { cursor:pointer; font-weight:600; }
details[open]>summary { margin-bottom:.5rem; }
pre { white-space:pre-wrap; overflow-wrap:anywhere; background:#f7f5f8; padding:1rem; border-radius:8px; }
.page-content .table-panel { padding:0; overflow:hidden; }
.search-form { display:flex; gap:.55rem; padding:1rem; align-items:center; }
.search-form input,.toolbar input { margin:0; }
.search-form input { max-width:25rem; }
.table-scroll { overflow-x:auto; }
table { width:100%; border-collapse:collapse; font-size:.94rem; }
th,td { text-align:left; padding:.85rem 1rem; border-bottom:1px solid var(--line); vertical-align:top; }
th { background:#f8f6fa; color:var(--muted); font-size:.84rem; font-weight:600; }
tbody tr:last-child td { border-bottom:0; }
dl { display:grid; grid-template-columns:minmax(8rem,27%) minmax(0,1fr); gap:.6rem 1.1rem; }
dt { color:var(--muted); }
dd { margin:0; overflow-wrap:anywhere; white-space:pre-wrap; }
.record-data { margin-bottom:0; gap:0; }
.record-data dt,.record-data dd { border-top:1px solid #eeeaf1; padding:.55rem 0; }
.record-data dt { padding-right:1rem; }
@media (max-width:1050px) {
  :root { --side:13.5rem; }
  .dashboard-grid { gap:.8rem; }
  .widget-heading { flex-wrap:wrap; }
}
@media (max-width:800px) {
  .sidebar { position:static; width:100%; padding:.85rem 1rem; border:0; border-bottom:1px solid var(--line); }
  .brand-row { justify-content:space-between; }
  .brand { margin:0; }
  .mobile-toggle { display:inline-flex; }
  .workspace { margin:0; }
  .topbar { min-height:50px; }
  .user-name { display:none; }
  .dashboard-head,.page-heading { align-items:flex-start; }
}
@media (max-width:650px) {
  .dashboard-grid,.field-grid { grid-template-columns:minmax(0,1fr); }
  .stat-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .topbar { padding-inline:1rem; }
  .page-content,footer { padding-inline:1rem; }
  .search-form { flex-wrap:wrap; }
  .search-form input { flex:1 1 10rem; }
  .agency { min-width:0; overflow-wrap:anywhere; }
  .identity { flex-shrink:0; }
  .page-content section { overflow-wrap:anywhere; }
  dl { grid-template-columns:minmax(0,1fr); }
  .record-data dt { padding-bottom:0; }
  .record-data dd { border:0; padding-top:.1rem; }
}

/* Domain workspaces share the same tabs, field groups and record tables. */
.page-content nav[aria-label] { display:flex; flex-wrap:wrap; gap:.35rem; padding:.55rem; margin:1rem 0 1.5rem; border:1px solid var(--line); border-radius:14px; background:rgba(255,255,255,.76); }
.page-content nav[aria-label] a { padding:.45rem .7rem; color:var(--muted); font-size:.9rem; text-decoration:none; border-radius:8px; }
.page-content nav[aria-label] a:is(:hover,[aria-current]) { color:var(--deep); background:var(--soft); }
.page-content nav[aria-label] a[aria-current] { font-weight:650; }
.page-content fieldset:not(.form-section) { min-width:0; margin:1.1rem 0; padding:1rem 1.2rem; border:1px solid var(--line); background:white; border-radius:var(--radius); box-shadow:var(--shadow); }
.page-content fieldset:not(.form-section)>legend { padding:0 .45rem; font-weight:650; color:#493263; }
.page-content fieldset:has(>p) { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.85rem 1.2rem; }
.page-content fieldset>p { margin:0; }
.page-content fieldset>p :is(input,select,textarea) { margin-bottom:0; }
.page-content fieldset>p:has(textarea) { grid-column:1/-1; }
.page-content>form[method="get"] { display:flex; align-items:flex-end; flex-wrap:wrap; gap:.75rem; margin:1rem 0; }
.page-content>form[method="get"] :is(input,select) { margin-bottom:0; }
.page-content>table { background:white; }
.page-content>form+form { margin-top:1rem; }
@media (max-width:650px) {
  .page-content fieldset:has(>p) { grid-template-columns:minmax(0,1fr); }
  .page-content>table { display:block; overflow-x:auto; }
}

input[type="file"]::file-selector-button {
  border:1px solid var(--accent); border-radius:.45rem; background:var(--soft); color:var(--deep);
  padding:.4rem .8rem; margin-inline-end:.65rem; font:inherit; font-weight:600; cursor:pointer;
}
input[type="file"]::file-selector-button:hover { background:var(--accent); color:white; }

.position-control-row{display:flex;align-items:start;gap:.4rem;min-width:0}
.position-control-row>[data-value-catalog]{flex:1;min-width:0}
.position-control-row>[data-position-toggle]{flex:none}
.position-editor{margin-block:.6rem;padding:.65rem;border:1px solid var(--line,#cdd5df);border-radius:.45rem}
.position-editor-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(14rem,100%),1fr));gap:.6rem;margin-bottom:.6rem}
.field:has([data-position-toggle][aria-expanded=true]){grid-column:1/-1}
.position-editor output{margin-inline-start:.5rem}
@media(max-width:520px){.position-control-row{flex-wrap:wrap}.position-control-row>[data-value-catalog]{min-width:8rem}}

/* Compact product frame: one wordmark, no agency strip or footer. */
.workspace .page-content { padding-top:1.25rem; }
.workspace-tools { float:right; display:flex; align-items:center; gap:.65rem; margin:0 0 .8rem 1rem; min-height:2.6rem; }
.workspace-tools + .page-heading, .workspace-tools ~ .dashboard-head { min-height:2.6rem; }
.page-content > .panel, .page-content > .talent-pool, .page-content > .candidate-workspace { clear:both; }
.auth-brand { padding:1rem; }
@media (max-width:800px) { .workspace-tools { float:none; justify-content:flex-end; margin:0 0 .8rem; } }
