:root {
  --ink: #17201f;
  --muted: #66706e;
  --paper: #f5f4ef;
  --surface: #fffefa;
  --line: #dcded8;
  --brand: #145c4f;
  --brand-dark: #0d443a;
  --brand-soft: #e1f0eb;
  --amber: #9a5d11;
  --amber-soft: #fff1d9;
  --danger: #9e3131;
  --danger-soft: #fae8e6;
  --blue: #315b8d;
  --blue-soft: #e6eef8;
  --shadow: 0 18px 50px rgb(31 46 42 / 8%);
  --radius: 18px;
  --radius-small: 11px;
  font-family: "DM Sans", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { min-height: 100%; scroll-behavior: smooth; }

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 8% -10%, rgb(203 230 219 / 65%), transparent 32rem),
    radial-gradient(circle at 96% 18%, rgb(234 222 192 / 55%), transparent 30rem),
    var(--paper);
  line-height: 1.55;
}

a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-dark); }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:disabled, textarea:disabled { cursor: not-allowed; opacity: .58; }

h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 16ch; margin-bottom: .85rem; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.25rem, 5vw, 4.7rem); font-weight: 500; letter-spacing: -.045em; line-height: .99; }
h2 { margin-bottom: .6rem; font-size: 1.35rem; letter-spacing: -.02em; }
h3 { margin-bottom: .4rem; font-size: 1.02rem; }
code { padding: .13rem .35rem; border-radius: 5px; background: #ecece5; color: #36423f; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78em; overflow-wrap: anywhere; }

.skip-link { position: fixed; z-index: 100; left: 1rem; top: -5rem; padding: .75rem 1rem; border-radius: 8px; background: var(--ink); color: white; }
.skip-link:focus { top: 1rem; }

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  min-height: 74px;
  padding: .75rem clamp(1rem, 4vw, 4rem);
  border-bottom: 1px solid rgb(23 32 31 / 9%);
  background: rgb(255 254 250 / 88%);
  backdrop-filter: blur(18px);
}

.brand { display: inline-flex; align-items: center; gap: .75rem; color: var(--ink); text-decoration: none; }
.brand-mark { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 12px; background: var(--brand); color: white; font-family: Georgia, serif; font-size: 1.35rem; }
.brand strong, .brand small { display: block; line-height: 1.15; }
.brand small { margin-top: .18rem; color: var(--muted); font-size: .72rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }

.primary-nav { display: flex; align-items: center; gap: .25rem; margin: 0 auto; }
.primary-nav-end { margin-right: 0; margin-left: auto; }
.primary-nav a { padding: .55rem .8rem; border-radius: 9px; color: #495250; font-size: .91rem; font-weight: 600; text-decoration: none; }
.primary-nav a:hover, .primary-nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-dark); }

.persona-chip { display: flex; align-items: center; gap: .8rem; padding-left: 1rem; border-left: 1px solid var(--line); }
.persona-chip small, .persona-chip strong { display: block; line-height: 1.2; }
.persona-chip small { color: var(--muted); font-size: .69rem; text-transform: uppercase; letter-spacing: .07em; }
.persona-chip strong { margin-top: .2rem; font-size: .88rem; }
.persona-chip form { margin: 0; }
.text-button { padding: .35rem; border: 0; background: transparent; color: var(--brand); font-size: .82rem; font-weight: 700; }

.page-shell { width: min(1220px, calc(100% - 2rem)); min-height: calc(100vh - 145px); margin: 0 auto; padding: clamp(2.2rem, 5vw, 5.5rem) 0; }
.site-footer { display: flex; justify-content: space-between; gap: 1rem; padding: 1.3rem clamp(1rem, 4vw, 4rem); border-top: 1px solid var(--line); color: var(--muted); font-size: .76rem; }

.hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, .8fr); align-items: center; gap: clamp(2rem, 7vw, 7rem); min-height: 460px; padding-bottom: clamp(3rem, 6vw, 6rem); }
.hero-compact { min-height: auto; padding-bottom: 2.5rem; }
.lead { max-width: 64ch; color: #55605e; font-size: clamp(1rem, 1.6vw, 1.18rem); }
.eyebrow { margin-bottom: .55rem; color: var(--brand); font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }

.button-row { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.5rem; }
.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; padding: .65rem 1rem; border: 1px solid transparent; border-radius: 10px; font-weight: 750; line-height: 1.2; text-decoration: none; transition: transform .12s ease, background .12s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--brand); color: white; }
.button-primary:hover { background: var(--brand-dark); color: white; }
.button-secondary { border-color: #c8cfca; background: var(--surface); color: var(--ink); }
.button-secondary:hover { border-color: #9ba9a4; color: var(--brand-dark); }
.button-danger { border-color: #e5b9b6; background: var(--danger-soft); color: var(--danger); }
.button-small { min-height: 35px; padding: .48rem .7rem; font-size: .82rem; }
.button-block { width: 100%; }

.badge { display: inline-flex; width: fit-content; align-items: center; padding: .26rem .58rem; border: 1px solid #d5dbd6; border-radius: 999px; background: #f3f5f1; color: #50605c; font-size: .68rem; font-weight: 800; letter-spacing: .055em; line-height: 1.3; text-transform: uppercase; }
.badge-warning { border-color: #edd6ac; background: var(--amber-soft); color: var(--amber); }
.badge-success { border-color: #b7dacd; background: var(--brand-soft); color: var(--brand-dark); }
.badge-lane { background: var(--blue-soft); color: var(--blue); }

.twin-card { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; overflow: hidden; padding: 1.6rem; border: 1px solid rgb(20 92 79 / 15%); border-radius: 28px; background: linear-gradient(145deg, #fffefa, #ecf4ef); box-shadow: var(--shadow); }
.twin-card::after { position: absolute; width: 170px; height: 170px; right: -75px; bottom: -90px; border-radius: 50%; background: rgb(20 92 79 / 9%); content: ""; }
.twin-card h2 { margin: .65rem 0 .2rem; }
.twin-card p { color: var(--muted); }
.twin-symbol { display: grid; width: 68px; height: 68px; place-items: center; border-radius: 20px; background: var(--ink); color: #dcf5eb; font-family: Georgia, serif; font-size: 1.1rem; }
.twin-symbol.small { width: 48px; height: 48px; border-radius: 14px; font-size: .85rem; }

.status-pairs { grid-column: 1 / -1; display: grid; gap: .7rem; margin: .7rem 0 0; }
.status-pairs div { display: flex; justify-content: space-between; gap: 1rem; padding-top: .7rem; border-top: 1px solid var(--line); }
.status-pairs dt { color: var(--muted); font-size: .76rem; }
.status-pairs dd { display: flex; align-items: center; gap: .45rem; margin: 0; font-size: .8rem; font-weight: 750; }
.status-pairs.compact { margin-top: 1rem; }
.status-pairs.horizontal { display: flex; grid-column: auto; gap: 2rem; margin: 0; }
.status-pairs.horizontal div { display: block; min-width: 100px; padding: 0; border: 0; }
.status-pairs.horizontal dd { margin-top: .2rem; }

.status-dot { display: inline-block; flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: #929b98; box-shadow: 0 0 0 3px rgb(146 155 152 / 14%); }
.status-dot[data-status="READY"], .status-dot[data-status="PUBLISHED"], .status-dot[data-status="CURRENT"], .status-dot[data-status="ACTIVE"] { background: #279475; box-shadow: 0 0 0 3px rgb(39 148 117 / 14%); }
.status-dot[data-status="FAILED"], .status-dot[data-status="UNAVAILABLE"], .status-dot[data-status="SUSPENDED"] { background: #c04a46; box-shadow: 0 0 0 3px rgb(192 74 70 / 14%); }
.status-dot[data-status="APPLYING"], .status-dot[data-status="PROVISIONING"], .status-dot[data-status="DEGRADED"] { background: #d8922c; box-shadow: 0 0 0 3px rgb(216 146 44 / 16%); }
.status-dot[data-status="QUEUED"], .status-dot[data-status="REVIEW_REQUIRED"] { background: #d8922c; box-shadow: 0 0 0 3px rgb(216 146 44 / 16%); }
.status-dot[data-status="RUNNING"] {
  background: #279475;
  box-shadow: 0 0 0 3px rgb(39 148 117 / 18%);
  animation: memory-worker-pulse 1s ease-in-out infinite;
}
.status-dot[data-status="COMPLETE"] { background: #279475; box-shadow: 0 0 0 4px rgb(39 148 117 / 18%); }
.status-dot.large { width: 13px; height: 13px; }

@keyframes memory-worker-pulse {
  0%, 100% { opacity: .4; transform: scale(.82); }
  50% { opacity: 1; transform: scale(1.16); }
}

@media (prefers-reduced-motion: reduce) {
  .status-dot[data-status="RUNNING"] { animation: none; }
}

.section-heading, .page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 1.4rem; }
.page-heading { align-items: center; margin-bottom: 2.3rem; }
.page-heading h1 { max-width: none; margin-bottom: .55rem; font-size: clamp(2.3rem, 4vw, 3.8rem); }
.section-heading h2, .section-heading p, .page-heading p { margin-bottom: 0; }
.section-heading.tight { align-items: start; margin-bottom: 1rem; }
.lane-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.lane-card { min-height: 260px; padding: 1.35rem; border: 1px solid var(--line); border-radius: var(--radius); background: rgb(255 254 250 / 84%); }
.lane-card-heading { display: flex; align-items: center; gap: .8rem; }
.lane-card-heading h3 { margin: 0; }
.lane-icon { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 10px; background: var(--brand-soft); color: var(--brand); font-size: .8rem; font-weight: 800; }
.lane-twin .lane-icon { background: var(--amber-soft); color: var(--amber); }
.lane-user-history .lane-icon { background: var(--blue-soft); color: var(--blue); }
.lane-card > p { min-height: 3rem; margin-top: 1.1rem; color: var(--muted); font-size: .88rem; }
.card-link { display: inline-flex; margin-top: 1rem; font-size: .84rem; font-weight: 750; text-decoration: none; }

.principle-strip { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 3rem; border-block: 1px solid var(--line); }
.principle-strip div { display: grid; gap: .2rem; padding: 1.25rem; }
.principle-strip div + div { border-left: 1px solid var(--line); }
.principle-strip strong { font-size: .85rem; }
.principle-strip span { color: var(--muted); font-size: .78rem; }

.notice { margin: 0 0 1rem; padding: .8rem 1rem; border: 1px solid #ced9d3; border-radius: var(--radius-small); background: #edf4f0; color: #3d5850; font-size: .87rem; }
.notice-success { border-color: #aed5c5; background: var(--brand-soft); color: var(--brand-dark); }
.notice-warning { border-color: #ecd1a1; background: var(--amber-soft); color: #815015; }
.notice.small { margin: .7rem 0; padding: .55rem .7rem; font-size: .76rem; }

.auth-hero { grid-template-columns: 1fr auto; }
.auth-panel { width: min(520px, 100%); padding: clamp(1.4rem, 4vw, 2.2rem); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.stacked-form { display: grid; gap: 1rem; margin-top: 1.3rem; }
.stacked-form label { display: grid; gap: .42rem; color: var(--ink); font-size: .84rem; font-weight: 700; }
.stacked-form input { width: 100%; padding: .72rem .8rem; border: 1px solid #c8cfca; border-radius: 9px; background: white; color: var(--ink); }
.stacked-form input:focus { border-color: var(--brand); outline: 3px solid rgb(20 92 79 / 12%); }
.stacked-form .auth-terms-field { grid-template-columns: auto 1fr; align-items: start; gap: .7rem; font-weight: 500; line-height: 1.45; }
.stacked-form .auth-terms-field input { width: 1.05rem; height: 1.05rem; margin-top: .12rem; padding: 0; accent-color: var(--brand); }
.muted { color: var(--muted); }
.notice-error { border-color: #e5b9b6; background: var(--danger-soft); color: var(--danger); }

.persona-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.persona-card { display: flex; min-height: 320px; flex-direction: column; padding: 1.35rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 10px 28px rgb(31 46 42 / 4%); }
.persona-card-top { display: flex; align-items: center; justify-content: space-between; gap: .7rem; }
.avatar { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark); font-family: Georgia, serif; font-size: 1.15rem; }
.persona-card h2 { margin: 1.1rem 0 .45rem; }
.persona-card p { color: var(--muted); font-size: .88rem; }
.persona-card form { margin-top: auto; }
.quiet-list { margin: 0 0 1.3rem; padding: 0; color: #57625f; font-size: .78rem; list-style: none; }
.quiet-list li::before { margin-right: .45rem; color: var(--brand); content: "✓"; }

.stack-list { display: grid; gap: .7rem; }
.status-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.status-row h2, .status-row p { margin-bottom: 0; }
.status-row h2 { font-size: .96rem; }
.status-row p { margin-top: .15rem; color: var(--muted); font-size: .8rem; }
.status-row > strong { font-size: .74rem; letter-spacing: .05em; text-transform: uppercase; }

.filter-bar { display: flex; align-items: end; gap: .7rem; margin-bottom: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: 14px; background: rgb(255 254 250 / 80%); }
.grow { flex: 1; }
label { display: grid; gap: .35rem; color: #46514f; font-size: .76rem; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid #c9ceca; border-radius: 9px; background: white; color: var(--ink); outline: none; }
input, select { min-height: 42px; padding: .55rem .7rem; }
textarea { resize: vertical; padding: .7rem; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgb(20 92 79 / 11%); }
.optional, .form-help { color: var(--muted); font-size: .7rem; font-weight: 450; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .8rem; }
th { padding: .75rem 1rem; background: #eceee9; color: #57615f; font-size: .67rem; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
td { max-width: 320px; padding: .9rem 1rem; border-top: 1px solid #e3e5e0; vertical-align: top; }
td strong, .cell-main { display: block; }
.cell-main { margin: .22rem 0 .45rem; color: #4f5957; }
.empty-cell { padding: 2.5rem; color: var(--muted); text-align: center; }
.bounded-note { margin: .6rem 0; color: var(--muted); font-size: .75rem; }

.section-block { margin-top: 2.2rem; }
.two-column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.panel { padding: 1.35rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 12px 34px rgb(31 46 42 / 4%); }
.form-stack { display: grid; gap: .85rem; }
.inset-form { margin-top: 1.2rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.compact-form { gap: .6rem; margin-top: .8rem; }

.proposal-list, .candidate-list { display: grid; gap: .7rem; }
.proposal, .candidate { padding: .9rem; border: 1px solid #e0e2de; border-radius: 11px; background: #fafaf6; }
.proposal p, .candidate p { margin: .7rem 0 .3rem; font-size: .88rem; }
.proposal small, .candidate small { color: var(--muted); }
.proposal-meta { display: flex; align-items: center; justify-content: space-between; gap: .7rem; color: var(--muted); font-size: .72rem; }
.decision-form { display: flex; align-items: end; gap: .55rem; margin-top: .75rem; }
.empty-state { padding: 3rem 1.5rem; border: 1px dashed #c9cfca; border-radius: var(--radius); color: var(--muted); text-align: center; }
.empty-state h2 { color: var(--ink); }
.empty-state p:last-child { margin-bottom: 0; }
.empty-state.small { padding: 1.5rem 1rem; }

.onboarding-summary { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.onboarding-summary h2, .onboarding-summary p { margin: 0; }
.onboarding-summary p { color: var(--muted); font-size: .82rem; }
.prompt-list { display: grid; gap: .25rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.prompt { display: grid; grid-template-columns: auto 1fr; gap: .7rem; padding: .8rem; border-radius: 10px; }
.prompt > span { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: #eceee9; color: var(--muted); font-size: .72rem; font-weight: 800; }
.prompt p { margin: .15rem 0 0; color: var(--muted); font-size: .8rem; }
.prompt.is-current { background: var(--brand-soft); }
.prompt.is-current > span { background: var(--brand); color: white; }
blockquote { margin: .55rem 0 0; padding-left: .7rem; border-left: 2px solid #afc9bf; color: #465650; font-size: .78rem; }
.state-cluster { display: flex; gap: .5rem; }

.chat-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, .75fr); gap: 1rem; align-items: start; }
.chat-panel, .context-panel { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 12px 34px rgb(31 46 42 / 4%); }
.message-list { display: grid; min-height: 410px; max-height: 620px; gap: .9rem; overflow-y: auto; padding: 1.25rem; align-content: start; }
.message { max-width: 85%; padding: .9rem 1rem; border-radius: 14px 14px 14px 4px; background: #eef0ec; }
.message-customer { margin-left: auto; border-radius: 14px 14px 4px 14px; background: var(--brand-soft); }
.message-system { max-width: 100%; border: 1px solid #ecd4aa; background: var(--amber-soft); }
.message-meta { display: flex; justify-content: space-between; gap: .7rem; margin-bottom: .4rem; color: var(--muted); font-size: .67rem; }
.message p { margin: 0; white-space: pre-wrap; }
.chat-empty { align-self: center; border: 0; }
.chat-empty .twin-symbol { margin: 0 auto 1rem; }
.composer { padding: 1rem; border-top: 1px solid var(--line); background: #fafaf6; }
.composer textarea { border: 0; background: transparent; box-shadow: none; }
.composer-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .5rem; }
.composer-footer small { color: var(--muted); }
.context-panel { padding: 1.15rem; }
.lane-status-list { display: grid; gap: .55rem; padding: .8rem; border-radius: 11px; background: #f2f3ee; }
.lane-status-list > div { display: flex; align-items: center; gap: .65rem; }
.lane-status-list strong, .lane-status-list small { display: block; }
.lane-status-list strong { font-size: .78rem; }
.lane-status-list small { color: var(--muted); font-size: .68rem; }
.context-lane { margin-top: 1rem; }
.context-lane h3 { padding-bottom: .45rem; border-bottom: 1px solid var(--line); }
.context-card { margin-bottom: .6rem; padding: .75rem; border: 1px solid #e0e2de; border-radius: 10px; }
.context-card > p { margin-bottom: .65rem; font-size: .8rem; }
.context-card dl { display: grid; gap: .25rem; margin: 0; }
.context-card dl div { display: flex; justify-content: space-between; gap: 1rem; font-size: .66rem; }
.context-card dt { color: var(--muted); }
.context-card dd { margin: 0; text-align: right; }
details { margin-top: .65rem; font-size: .72rem; }
summary { color: var(--brand); cursor: pointer; font-weight: 750; }
.muted { color: var(--muted); font-size: .8rem; }

.error-card { max-width: 680px; margin: 2rem auto; padding: clamp(1.5rem, 5vw, 3.5rem); border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
.error-card h1 { max-width: 14ch; font-size: clamp(2rem, 5vw, 3.6rem); }
.error-code { display: inline-block; margin-bottom: 1.4rem; color: #bec5c0; font-family: Georgia, serif; font-size: 4rem; line-height: 1; }
.field-errors { padding: .8rem 1rem .8rem 2rem; border-radius: 10px; background: var(--danger-soft); color: var(--danger); font-size: .82rem; }
.request-reference { margin-top: 2rem; color: var(--muted); font-size: .76rem; }

.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(1px, 1px, 1px, 1px) !important; white-space: nowrap !important; }

@media (max-width: 900px) {
  .site-header { flex-wrap: wrap; gap: .6rem; }
  .primary-nav { order: 3; width: 100%; overflow-x: auto; }
  .primary-nav-end { order: initial; width: auto; margin-left: auto; overflow: visible; }
  .persona-chip { margin-left: auto; }
  .hero, .chat-layout { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .lane-grid, .persona-grid { grid-template-columns: repeat(2, 1fr); }
  .principle-strip { grid-template-columns: 1fr; }
  .principle-strip div + div { border-top: 1px solid var(--line); border-left: 0; }
}

@media (max-width: 650px) {
  .page-shell { width: min(100% - 1.2rem, 1220px); }
  .site-header { padding-inline: .75rem; }
  .brand small, .persona-chip small { display: none; }
  .persona-chip { padding-left: .6rem; }
  .primary-nav a { padding: .45rem .6rem; font-size: .8rem; }
  .hero { gap: 2rem; }
  .lane-grid, .persona-grid, .two-column { grid-template-columns: 1fr; }
  .page-heading, .section-heading, .filter-bar, .decision-form, .site-footer { align-items: stretch; flex-direction: column; }
  .filter-bar, .decision-form { display: flex; }
  .status-pairs.horizontal { display: grid; gap: .5rem; }
  .onboarding-summary { align-items: flex-start; flex-wrap: wrap; }
  .message { max-width: 95%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Company Admin workspace -------------------------------------------------- */

.workspace-body {
  --workspace-sidebar-width: 284px;
  --workspace-topbar-height: 76px;
  --workspace-page: #f7f8f5;
  --workspace-panel: #ffffff;
  --workspace-sidebar: #eef1ed;
  --workspace-line: #e2e6e1;
  --workspace-line-strong: #d4dad4;
  --workspace-muted: #68726f;
  --workspace-soft: #f0f2ef;
  --workspace-accent: var(--brand);
  min-height: 100dvh;
  overflow: hidden;
  background: var(--workspace-page);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
}

.workspace-body [hidden] { display: none !important; }

.workspace-body h1,
.workspace-body h2,
.workspace-body h3 {
  max-width: none;
  margin: 0;
  font-family: inherit;
  letter-spacing: -.025em;
}

.workspace-body button,
.workspace-body a,
.workspace-body input,
.workspace-body textarea,
.workspace-body summary {
  -webkit-tap-highlight-color: transparent;
}

.workspace-body button:focus-visible,
.workspace-body a:focus-visible,
.workspace-body input:focus-visible,
.workspace-body textarea:focus-visible,
.workspace-body summary:focus-visible {
  outline: 3px solid rgb(20 92 79 / 22%);
  outline-offset: 2px;
}

.workspace-body svg {
  display: block;
  fill: none;
  stroke: currentcolor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.workspace-shell {
  display: grid;
  grid-template-columns: var(--workspace-sidebar-width) minmax(0, 1fr);
  min-height: 100dvh;
  background: var(--workspace-panel);
}

/* Sidebar */

.workspace-sidebar {
  position: relative;
  z-index: 40;
  display: grid;
  min-width: 0;
  height: 100dvh;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border-right: 1px solid var(--workspace-line);
  background: var(--workspace-sidebar);
}

.memory-mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 14px 14px 10px;
  padding: 4px;
  border: 1px solid rgb(23 32 31 / 5%);
  border-radius: 14px;
  background: rgb(255 255 255 / 58%);
}

.workspace-sidebar-controls { min-width: 0; }

.memory-mode-option {
  min-height: 40px;
  padding: .5rem .75rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #586360;
  font-size: .82rem;
  font-weight: 730;
  letter-spacing: -.01em;
  transition: background .16s ease, box-shadow .16s ease, color .16s ease;
}

.memory-mode-option:hover { color: var(--workspace-accent); }

.memory-mode-option.is-active,
.memory-mode-option[aria-pressed="true"] {
  background: var(--workspace-panel);
  box-shadow: 0 1px 2px rgb(23 32 31 / 8%), 0 6px 16px rgb(23 32 31 / 5%);
  color: var(--workspace-accent);
}

.new-training-session-form,
.new-company-chat-form {
  margin: 14px 14px 10px;
}

.workspace-sidebar-controls .memory-mode-switch { margin-bottom: 8px; }
.workspace-sidebar-controls .new-company-chat-form { margin-top: 0; }

.new-training-session-button,
.new-company-chat-button {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 14px;
  border: 1px solid var(--workspace-accent);
  border-radius: 12px;
  background: var(--workspace-accent);
  color: #fff;
  font-size: .79rem;
  font-weight: 760;
  transition: background .14s ease, border-color .14s ease, transform .14s ease;
}

.new-training-session-button:hover,
.new-company-chat-button:hover {
  border-color: var(--brand-dark);
  background: var(--brand-dark);
}

.new-training-session-button:active,
.new-company-chat-button:active { transform: translateY(1px); }
.new-training-session-button svg,
.new-company-chat-button svg { width: 17px; height: 17px; }

.workspace-sidebar-scroll {
  display: flex;
  min-height: 0;
  flex-direction: column;
  overflow-y: auto;
  padding: 18px 12px 20px;
  scrollbar-color: #c3cbc5 transparent;
  scrollbar-width: thin;
}

.sidebar-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 9px 10px;
  color: #7a8481;
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .105em;
  text-transform: uppercase;
}

.sidebar-count {
  display: grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 99px;
  background: #dfe4df;
  color: #5e6965;
  font-size: .65rem;
}

.twin-navigation { display: grid; gap: 8px; }

.twin-nav-group {
  padding: 4px;
  border-radius: 14px;
  transition: background .16s ease;
}

.twin-nav-group:hover { background: rgb(255 255 255 / 37%); }

.twin-nav-heading {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 30px;
  align-items: center;
  min-height: 50px;
  border-radius: 11px;
  transition: background .16s ease, box-shadow .16s ease;
}

.twin-nav-heading.is-active {
  background: rgb(255 255 255 / 75%);
  box-shadow: inset 3px 0 var(--workspace-accent);
}

.icon-button {
  display: inline-grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #596460;
  transition: background .14s ease, color .14s ease, transform .14s ease;
}

.icon-button:hover {
  background: rgb(20 92 79 / 9%);
  color: var(--workspace-accent);
}

.icon-button:active { transform: scale(.96); }
.icon-button svg { width: 19px; height: 19px; }

.twin-collapse {
  width: 26px;
  height: 32px;
  color: #7b8581;
}

.twin-collapse svg {
  width: 15px;
  height: 15px;
  transition: transform .16s ease;
}

.twin-collapse[aria-expanded="false"] svg { transform: rotate(-90deg); }

.twin-nav-link {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 5px 4px;
  color: var(--ink);
  text-decoration: none;
}

.twin-nav-link:hover { color: var(--ink); }

.workspace-avatar {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(145deg, #174f45, #0d382f);
  color: #e7f4ef;
  font-weight: 790;
  letter-spacing: -.03em;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 14%);
}

.workspace-avatar-small { width: 34px; height: 34px; font-size: .69rem; }
.workspace-avatar-header { width: 42px; height: 42px; font-size: .82rem; }
.workspace-avatar-account { width: 38px; height: 38px; font-size: .74rem; }

.twin-nav-copy,
.workspace-account-copy,
.active-twin-copy {
  display: block;
  min-width: 0;
}

.twin-nav-copy strong,
.twin-nav-copy small,
.workspace-account-copy strong,
.workspace-account-copy small,
.active-twin-copy strong,
.active-twin-copy small {
  display: block;
  overflow: hidden;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.twin-nav-copy strong { font-size: .82rem; }
.twin-nav-copy small { margin-top: 2px; color: var(--workspace-muted); font-size: .67rem; }

.new-job-button {
  width: 30px;
  height: 30px;
  opacity: 0;
  transform: translateX(-3px);
}

.new-job-button svg { width: 16px; height: 16px; }

.twin-nav-heading:hover .new-job-button,
.new-job-button:focus-visible {
  opacity: 1;
  transform: translateX(0);
}

.job-nav-list {
  display: grid;
  gap: 2px;
  margin: 4px 0 0;
  padding: 0 0 0 35px;
  list-style: none;
}

.job-nav-list li { min-width: 0; }

.training-session-navigation,
.company-chat-navigation { min-width: 0; }

.training-session-list {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 0 4px;
  list-style: none;
}

.training-session-list li { min-width: 0; }

.training-session-item {
  display: grid;
  min-height: 40px;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 9px;
  color: #59635f;
  font-size: .76rem;
  text-decoration: none;
  transition: background .14s ease, color .14s ease, box-shadow .14s ease;
}

.training-session-item svg { width: 17px; height: 17px; }

.training-session-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.training-session-item:hover {
  background: rgb(255 255 255 / 72%);
  color: var(--ink);
}

.training-session-item.is-active {
  background: var(--workspace-panel);
  box-shadow: 0 1px 2px rgb(23 32 31 / 6%);
  color: var(--workspace-accent);
  font-weight: 730;
}

.training-session-navigation .show-more-jobs,
.company-chat-navigation .show-more-jobs { margin-left: 10px; }

.job-nav-item {
  display: grid;
  width: 100%;
  min-height: 36px;
  grid-template-columns: 8px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #59635f;
  font-size: .76rem;
  text-align: left;
  transition: background .14s ease, color .14s ease;
}

.job-nav-item > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-nav-item:hover {
  background: rgb(255 255 255 / 72%);
  color: var(--ink);
}

.job-nav-item.is-active {
  background: var(--workspace-panel);
  box-shadow: 0 1px 2px rgb(23 32 31 / 6%);
  color: var(--workspace-accent);
  font-weight: 730;
}

.job-state-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #adb5b1;
  box-shadow: 0 0 0 3px rgb(173 181 177 / 13%);
}

.job-state-dot[data-state="ACTIVE"],
.job-state-dot[data-state="RUNNING"] {
  background: #2d9879;
  box-shadow: 0 0 0 3px rgb(45 152 121 / 14%);
}

.job-state-dot[data-state="COMPLETE"] { background: #87938e; }

.show-more-jobs {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 4px 0 2px 40px;
  padding: 5px 7px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--workspace-muted);
  font-size: .69rem;
  font-weight: 700;
}

.show-more-jobs:hover { background: rgb(255 255 255 / 65%); color: var(--workspace-accent); }
.show-more-jobs svg { width: 13px; height: 13px; transition: transform .16s ease; }
.show-more-jobs[aria-expanded="true"] svg { transform: rotate(180deg); }

.artifact-archive-link {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: auto;
  padding: 13px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #4f5a56;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.artifact-archive-link:hover,
.artifact-archive-link.is-active {
  border-color: var(--workspace-line);
  background: rgb(255 255 255 / 75%);
  color: var(--workspace-accent);
}

.artifact-archive-link > svg { width: 21px; height: 21px; }
.artifact-archive-link strong,
.artifact-archive-link small { display: block; line-height: 1.25; }
.artifact-archive-link strong { font-size: .78rem; }
.artifact-archive-link small { margin-top: 2px; color: var(--workspace-muted); font-size: .65rem; }

.workspace-account {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 7px;
  min-height: 70px;
  padding: 11px 12px;
  border-top: 1px solid var(--workspace-line);
  background: rgb(255 255 255 / 43%);
}

.workspace-account-copy strong { font-size: .75rem; }
.workspace-account-copy small { margin-top: 2px; color: var(--workspace-muted); font-size: .64rem; }
.account-action { width: 34px; height: 34px; }

/* Main workspace frame */

.workspace-main {
  display: grid;
  min-width: 0;
  height: 100dvh;
  grid-template-rows: var(--workspace-topbar-height) minmax(0, 1fr);
  overflow: hidden;
  background: var(--workspace-panel);
}

.workspace-topbar {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
  padding: 0 clamp(22px, 3vw, 48px);
  border-bottom: 1px solid var(--workspace-line);
  background: rgb(255 255 255 / 94%);
  backdrop-filter: blur(16px);
}

.mobile-nav-toggle { display: none; }

.active-job-heading { min-width: 0; }
.active-job-heading > span {
  display: block;
  margin-bottom: 2px;
  color: var(--workspace-muted);
  font-size: .64rem;
  font-weight: 790;
  letter-spacing: .09em;
  line-height: 1.2;
  text-transform: uppercase;
}

.active-job-heading h1 {
  overflow: hidden;
  font-size: clamp(1rem, 1.6vw, 1.22rem);
  font-weight: 760;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.active-twin {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
  padding: 5px;
  border-radius: 12px;
  color: var(--ink);
}

.active-company {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
  color: var(--ink);
}

.active-company-copy {
  min-width: 0;
  max-width: 210px;
  text-align: right;
}

.active-company-copy strong {
  display: block;
  overflow: hidden;
  font-size: .76rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.company-logo {
  display: inline-grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #174f45, #0d382f);
  color: #e7f4ef;
  font-size: .76rem;
  font-weight: 790;
  letter-spacing: -.03em;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 14%);
}

.active-account-summary { cursor: default; }
.active-twin-copy { max-width: 180px; text-align: right; }
.active-twin-copy strong { font-size: .76rem; }
.active-twin-copy small { margin-top: 2px; color: var(--workspace-muted); font-size: .65rem; }

.workspace-content {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 310px);
  overflow: hidden;
}

.platform-admin-chat-workspace .workspace-content {
  grid-template-columns: minmax(0, 1fr);
}

.conversation {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  background: #fff;
}

.conversation-scroll {
  min-height: 0;
  overflow-y: auto;
  padding: clamp(28px, 4vw, 58px) clamp(26px, 6vw, 88px) 70px;
  scrollbar-color: #d2d8d3 transparent;
  scrollbar-width: thin;
}

.workspace-notice {
  width: min(740px, 100%);
  margin: 0 auto 12px;
  padding: 10px 13px;
  border: 1px solid #cbe0d7;
  border-radius: 10px;
  background: #eef7f3;
  color: #315d50;
  font-size: .73rem;
}

.workspace-notice-muted {
  border-color: var(--workspace-line);
  background: #f6f7f5;
  color: var(--workspace-muted);
}

.message-stream {
  display: flex;
  width: min(760px, 100%);
  min-height: 100%;
  flex-direction: column;
  justify-content: flex-end;
  gap: 26px;
  margin: 0 auto;
}

.workspace-message {
  display: grid;
  max-width: min(690px, 92%);
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  gap: 11px;
}

.workspace-message-customer {
  display: block;
  align-self: flex-end;
  padding: 14px 17px;
  border: 1px solid #dfe4e0;
  border-radius: 16px 16px 5px 16px;
  background: #f0f2ef;
}

.workspace-message-agent,
.workspace-message-digital_twin,
.workspace-message-assistant { align-self: flex-start; }

.workspace-message-system {
  display: block;
  max-width: 100%;
  align-self: stretch;
  padding: 12px 14px;
  border: 1px solid #eadbbf;
  border-radius: 12px;
  background: #fff9ed;
  color: #72521e;
}

.message-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: .62rem;
  font-weight: 800;
}

.message-content { min-width: 0; }
.message-content p {
  margin: 0;
  color: #2e3835;
  font-size: .88rem;
  line-height: 1.62;
  white-space: pre-wrap;
}

.workspace-message-customer .message-content p { line-height: 1.5; }

.workspace-message-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 6px;
  color: var(--workspace-muted);
  font-size: .63rem;
}

.workspace-message-meta strong { color: #4b5652; font-size: .67rem; }

.workspace-empty-state {
  display: grid;
  width: min(520px, 100%);
  min-height: 100%;
  align-content: center;
  justify-items: center;
  margin: auto;
  padding: 44px 20px;
  text-align: center;
}

.workspace-avatar-empty {
  width: 68px;
  height: 68px;
  margin-bottom: 20px;
  font-size: 1.05rem;
  box-shadow: 0 12px 30px rgb(13 68 58 / 18%);
}

.workspace-empty-state .eyebrow { margin-bottom: 7px; }
.workspace-empty-state h2 { font-size: clamp(1.55rem, 3vw, 2.4rem); font-weight: 630; }
.workspace-empty-state > p:last-child {
  max-width: 50ch;
  margin: 13px 0 0;
  color: var(--workspace-muted);
  font-size: .88rem;
}

.thinking-indicator {
  display: flex;
  width: min(760px, 100%);
  align-items: center;
  gap: 9px;
  margin: 25px auto 0;
  color: #4e5955;
  font-size: .77rem;
  font-weight: 700;
}

.thinking-indicator[hidden] { display: none; }
.thinking-indicator > span:first-child {
  width: 14px;
  height: 14px;
  border: 2px solid #d8ddda;
  border-top-color: var(--workspace-accent);
  border-radius: 50%;
  animation: workspace-spin .8s linear infinite;
}

@keyframes workspace-spin { to { transform: rotate(360deg); } }

.composer-wrap {
  position: relative;
  z-index: 5;
  padding: 12px clamp(24px, 6vw, 88px) 17px;
  background: linear-gradient(to bottom, rgb(255 255 255 / 40%), #fff 18%);
}

.workspace-composer {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 12px 13px 10px;
  border: 1px solid #dbe1dc;
  border-radius: 16px;
  background: #f2f4f1;
  box-shadow: 0 10px 30px rgb(23 32 31 / 7%);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.workspace-composer textarea {
  display: block;
  min-height: 28px;
  max-height: calc(1.55em * 12 + 12px);
  padding: 3px 5px 7px;
  overflow-y: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  font-size: .88rem;
  line-height: 1.55;
  resize: none;
}

.workspace-composer textarea:focus,
.workspace-composer textarea:focus-visible {
  border: 0;
  outline: none;
  box-shadow: none;
}
.workspace-composer textarea::placeholder { color: #8e9794; }

.composer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 5px;
}

.composer-actions { display: flex; min-width: 0; align-items: center; gap: 5px; }
.composer-actions-right { justify-content: flex-end; }

.composer-icon-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #53605b;
  transition: background .14s ease, color .14s ease, transform .14s ease;
}

.composer-icon-button:hover { background: #e3e8e4; color: var(--workspace-accent); }
.composer-icon-button:active { transform: scale(.96); }
.composer-icon-button svg { width: 19px; height: 19px; }

.memory-destination {
  overflow: hidden;
  margin-left: 3px;
  color: var(--workspace-muted);
  font-size: .64rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.memory-destination strong { color: var(--workspace-accent); font-weight: 750; }

.send-button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 13px;
  border: 1px solid var(--workspace-accent);
  border-radius: 10px;
  background: var(--workspace-accent);
  color: #fff;
  font-size: .75rem;
  font-weight: 760;
  transition: background .14s ease, border-color .14s ease, transform .14s ease;
}

.send-button:hover:not(:disabled) { border-color: var(--brand-dark); background: var(--brand-dark); }
.send-button:active:not(:disabled) { transform: translateY(1px); }
.send-button svg { width: 15px; height: 15px; }

/* Job progress rail */

.job-rail {
  min-width: 0;
  overflow-y: auto;
  padding: clamp(20px, 3vw, 34px) clamp(18px, 2.2vw, 28px);
  border-left: 0;
  background: var(--workspace-panel);
  scrollbar-width: thin;
}

.job-progress-card,
.twin-stats-card,
.profile-account-card {
  border: 1px solid var(--workspace-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 28px rgb(23 32 31 / 5%);
}

.job-progress-card {
  padding: 20px;
  background: var(--workspace-page);
}
.job-card-kicker {
  display: block;
  margin-bottom: 6px;
  color: var(--workspace-accent);
  font-size: .62rem;
  font-weight: 820;
  letter-spacing: .095em;
  text-transform: uppercase;
}

.job-progress-card > header h2 {
  font-size: 1.08rem;
  font-weight: 750;
  line-height: 1.3;
}

.expert-twin-card-header p {
  margin: 7px 0 0;
  color: #46514d;
  font-size: .82rem;
  font-weight: 650;
  line-height: 1.4;
}

.expert-twin-skills {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--workspace-line);
}

.expert-twin-skills h3 {
  color: #68726f;
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .075em;
  text-transform: uppercase;
}

.expert-twin-skills ul {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.expert-twin-skills li {
  padding: 9px 11px;
  border: 1px solid #dde3de;
  border-radius: 9px;
  background: rgb(255 255 255 / 72%);
  color: #48534f;
  font-size: .7rem;
  font-weight: 690;
}

.company-twin-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 22px;
  padding: 0;
  list-style: none;
}

.company-twin-list li {
  display: grid;
  min-width: 0;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding: 10px;
  border: 1px solid #dde3de;
  border-radius: 11px;
  background: rgb(255 255 255 / 72%);
}

.company-twin-avatar {
  width: 40px;
  height: 40px;
  font-size: .72rem;
}

.company-twin-list strong,
.company-twin-list small {
  display: block;
  overflow: hidden;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.company-twin-list strong { font-size: .76rem; }
.company-twin-list small {
  margin-top: 3px;
  color: var(--workspace-muted);
  font-size: .66rem;
}

.job-step-list {
  display: grid;
  gap: 0;
  margin: 24px 0;
  padding: 0;
  list-style: none;
}

.job-step-list li {
  position: relative;
  display: grid;
  min-height: 51px;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
}

.job-step-list li:not(:last-child)::after {
  position: absolute;
  width: 1px;
  height: calc(100% - 18px);
  left: 10px;
  top: 19px;
  background: #dfe4e0;
  content: "";
}

.job-step-list strong,
.job-step-list small { display: block; line-height: 1.25; }
.job-step-list strong { padding-top: 1px; color: #3b4642; font-size: .75rem; }
.job-step-list small { margin-top: 4px; color: #8a9390; font-size: .62rem; }
.job-step-list li[aria-current="step"] strong { color: var(--workspace-accent); }

.job-step-marker {
  position: relative;
  z-index: 1;
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border: 1px solid #d5dbd6;
  border-radius: 50%;
  background: #fff;
}

.job-step-marker > span { width: 6px; height: 6px; border-radius: 50%; background: #bdc4c0; }
.job-step-marker svg { width: 12px; height: 12px; color: #fff; stroke-width: 2.3; }
.job-step-list li[data-state="COMPLETE"] .job-step-marker { border-color: var(--workspace-accent); background: var(--workspace-accent); }
.job-step-list li[data-state="ACTIVE"] .job-step-marker { border-color: #69a592; box-shadow: 0 0 0 4px rgb(20 92 79 / 10%); }
.job-step-list li[data-state="ACTIVE"] .job-step-marker > span { background: var(--workspace-accent); }

.job-memory-details {
  margin: 15px 1px 0;
  padding-top: 13px;
  border-top: 1px solid var(--workspace-line);
}

.job-memory-details summary { color: #5b6662; font-size: .67rem; }

.job-memory-lanes {
  display: grid;
  gap: 10px;
  margin-top: 13px;
}

.job-memory-lanes > div { display: grid; grid-template-columns: 9px minmax(0, 1fr); align-items: center; gap: 9px; }
.job-memory-lanes strong,
.job-memory-lanes small { display: block; line-height: 1.2; }
.job-memory-lanes strong { color: #4e5955; font-size: .66rem; }
.job-memory-lanes small { margin-top: 2px; color: #909895; font-size: .59rem; }

.job-context-details { margin-top: 10px; }

.job-context-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.job-context-empty {
  margin: 2px 0 0;
  color: var(--workspace-muted);
  font-size: .62rem;
  line-height: 1.45;
}

.job-context-list > div {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border-radius: 9px;
  background: var(--workspace-soft);
}

.job-context-list span {
  color: var(--workspace-accent);
  font-size: .55rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.job-context-list strong {
  color: #4d5955;
  font-size: .64rem;
  font-weight: 630;
  line-height: 1.4;
}

.job-context-meta {
  display: grid;
  gap: 3px;
  margin: 5px 0 0;
}

.job-context-meta > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #7d8783;
  font-size: .55rem;
}

.job-context-meta dd { margin: 0; text-align: right; }

.job-context-challenge {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid var(--workspace-line);
}

.job-context-challenge summary { font-size: .59rem; }

.job-context-challenge form {
  display: grid;
  gap: 6px;
  margin-top: 7px;
}

.job-context-challenge textarea {
  min-height: 54px;
  padding: 7px 8px;
  border-color: var(--workspace-line-strong);
  border-radius: 8px;
  font-size: .61rem;
  line-height: 1.4;
  resize: vertical;
}

.job-context-challenge button {
  min-height: 28px;
  padding: 5px 8px;
  border: 1px solid #acc8be;
  border-radius: 7px;
  background: #fff;
  color: var(--workspace-accent);
  font-size: .59rem;
  font-weight: 750;
}

.job-context-challenge button:hover { background: var(--brand-soft); }

/* Floating controls */

.document-editor-button {
  position: fixed;
  z-index: 25;
  right: 22px;
  bottom: 20px;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  padding: 0;
  border: 1px solid #cfd6d1;
  border-radius: 15px;
  background: #fff;
  color: var(--workspace-accent);
  box-shadow: 0 12px 32px rgb(23 32 31 / 14%);
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.document-editor-button:hover { background: var(--brand-soft); box-shadow: 0 15px 36px rgb(23 32 31 / 18%); transform: translateY(-2px); }
.document-editor-button svg { width: 23px; height: 23px; }

.workspace-toast {
  position: fixed;
  z-index: 80;
  right: 24px;
  bottom: 82px;
  width: min(340px, calc(100vw - 32px));
  padding: 12px 15px;
  border: 1px solid #cbd9d2;
  border-radius: 12px;
  background: #fff;
  color: #3b4743;
  box-shadow: 0 16px 45px rgb(23 32 31 / 17%);
  font-size: .75rem;
}

.workspace-toast[hidden] { display: none; }
.workspace-scrim { display: none; }

/* Digital Twin profile */

.twin-profile-layout {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
  overflow: hidden;
}

.twin-profile-main {
  min-width: 0;
  overflow-y: auto;
  padding: clamp(34px, 5vw, 70px) clamp(28px, 7vw, 108px) 72px;
  scrollbar-color: #d2d8d3 transparent;
  scrollbar-width: thin;
}

.twin-profile-identity {
  display: grid;
  width: min(900px, 100%);
  grid-template-columns: clamp(112px, 14vw, 164px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 42px);
  margin: 0 auto;
}

.twin-profile-avatar {
  width: clamp(112px, 14vw, 164px);
  height: clamp(112px, 14vw, 164px);
  background: linear-gradient(145deg, #57716a, #173f36);
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  box-shadow: 0 18px 45px rgb(23 63 54 / 18%);
}

.twin-profile-copy .eyebrow { margin-bottom: 6px; }
.twin-profile-copy h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 720; line-height: 1.05; }
.twin-role { margin: 5px 0 0; color: #3e4945; font-size: clamp(1.05rem, 2vw, 1.45rem); letter-spacing: -.02em; }

.expert-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 17px;
}

.expert-link {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid var(--workspace-line-strong);
  border-radius: 9px;
  background: #fff;
  color: #34403c;
  font-size: .75rem;
  font-weight: 720;
  transition: border-color .14s ease, background .14s ease, color .14s ease;
}

.expert-link:hover { border-color: #a8bcb4; background: var(--brand-soft); color: var(--workspace-accent); }
.expert-link svg { width: 18px; height: 18px; }

.twin-profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
}

.twin-profile-tags span {
  padding: 6px 10px;
  border-radius: 99px;
  background: var(--workspace-soft);
  color: #55605c;
  font-size: .64rem;
  font-weight: 680;
}

.twin-start-job {
  width: min(900px, 100%);
  margin: clamp(56px, 8vw, 96px) auto 0;
}

.twin-start-job > h2 {
  margin-bottom: 20px;
  font-size: clamp(1.85rem, 3.7vw, 3.15rem);
  font-weight: 520;
  line-height: 1.13;
}

.twin-start-composer { width: 100%; }

.twin-skills {
  width: min(900px, 100%);
  margin: clamp(48px, 7vw, 78px) auto 0;
  padding-top: clamp(30px, 4vw, 46px);
  border-top: 1px solid var(--workspace-line);
}

.profile-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 18px;
}

.profile-section-heading .eyebrow { margin-bottom: 4px; }
.profile-section-heading h2 { font-size: 1.45rem; font-weight: 720; }
.profile-section-heading > span { color: var(--workspace-muted); font-size: .7rem; }

.skill-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.skill-card {
  position: relative;
  min-height: 142px;
  overflow: hidden;
  padding: 17px 15px 15px;
  border: 1px solid var(--workspace-line);
  border-radius: 14px;
  background: var(--workspace-soft);
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.skill-card:hover { border-color: #c1d1ca; background: #f7faf8; transform: translateY(-2px); }
.skill-number {
  display: block;
  margin-bottom: 16px;
  color: #9aa29f;
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .09em;
}

.skill-card h3 { font-size: .79rem; font-weight: 750; }
.skill-card p { margin: 7px 0 0; color: var(--workspace-muted); font-size: .66rem; line-height: 1.45; }

.show-all-skills {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 18px auto 0;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--workspace-accent);
  font-size: .72rem;
  font-weight: 740;
}

.show-all-skills:hover { background: var(--brand-soft); }
.show-all-skills svg { width: 15px; height: 15px; transition: transform .16s ease; }
.show-all-skills[aria-expanded="true"] svg { transform: rotate(180deg); }

.twin-profile-rail {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
  padding: clamp(20px, 3vw, 34px) clamp(18px, 2.2vw, 28px);
  border-left: 1px solid var(--workspace-line);
  background: var(--workspace-page);
}

.twin-stats-card { padding: 20px; }
.twin-stats-card .eyebrow { margin-bottom: 4px; }
.twin-stats-card h2 { font-size: 1.08rem; font-weight: 750; }

.current-jobs-compact {
  display: grid;
  gap: 3px;
  margin-top: 22px;
}

.current-jobs-compact > strong {
  margin-bottom: 5px;
  color: var(--workspace-muted);
  font-size: .62rem;
  letter-spacing: .075em;
  text-transform: uppercase;
}

.current-jobs-compact button {
  display: grid;
  width: 100%;
  min-height: 35px;
  grid-template-columns: 8px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 6px 7px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #4e5955;
  font-size: .72rem;
  text-align: left;
}

.current-jobs-compact button:hover { background: var(--workspace-soft); color: var(--workspace-accent); }

.twin-stat-list {
  display: grid;
  gap: 9px;
  margin: 25px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--workspace-line);
}

.twin-stat-list div { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.twin-stat-list dt { color: var(--workspace-muted); font-size: .68rem; }
.twin-stat-list dd { margin: 0; color: #34403c; font-size: .7rem; font-weight: 750; text-align: right; }

.profile-account-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 14px;
}

.profile-account-card strong,
.profile-account-card small { display: block; overflow: hidden; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.profile-account-card strong { font-size: .74rem; }
.profile-account-card small { margin-top: 2px; color: var(--workspace-muted); font-size: .63rem; }

/* Artifact archive */

.artifact-archive {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  padding: clamp(34px, 5vw, 70px) clamp(28px, 7vw, 108px) 78px;
  background: var(--workspace-page);
  scrollbar-color: #d2d8d3 transparent;
  scrollbar-width: thin;
}

.archive-heading {
  display: flex;
  width: min(1120px, 100%);
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin: 0 auto 30px;
}

.archive-heading .eyebrow { margin-bottom: 5px; }
.archive-heading h2 { font-size: clamp(1.65rem, 3vw, 2.35rem); font-weight: 680; }
.archive-heading > div > p:last-child { margin: 9px 0 0; color: var(--workspace-muted); font-size: .8rem; }

.archive-search {
  position: relative;
  display: block;
  width: min(280px, 100%);
  flex: 0 0 auto;
}

.archive-search svg {
  position: absolute;
  z-index: 1;
  width: 18px;
  height: 18px;
  left: 13px;
  top: 50%;
  color: #818b87;
  transform: translateY(-50%);
}

.archive-search input {
  height: 44px;
  padding: 8px 13px 8px 40px;
  border-color: var(--workspace-line-strong);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 5px 16px rgb(23 32 31 / 4%);
  font-size: .76rem;
}

.artifact-list {
  display: grid;
  width: min(1120px, 100%);
  gap: 8px;
  margin: 0 auto;
}

.artifact-row {
  display: grid;
  min-width: 0;
  grid-template-columns: 42px minmax(190px, 1.4fr) minmax(150px, .9fr) minmax(115px, .55fr) 36px;
  align-items: center;
  gap: 16px;
  min-height: 78px;
  padding: 12px 14px;
  border: 1px solid var(--workspace-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 14px rgb(23 32 31 / 3%);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.artifact-row:hover {
  border-color: #c4d3cc;
  box-shadow: 0 9px 24px rgb(23 32 31 / 6%);
  transform: translateY(-1px);
}

.artifact-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 11px;
  background: var(--brand-soft);
  color: var(--workspace-accent);
}

.artifact-icon svg { width: 21px; height: 21px; }

.artifact-main,
.artifact-job,
.artifact-date { min-width: 0; }

.artifact-main strong,
.artifact-main small,
.artifact-job strong,
.artifact-job small,
.artifact-date small { display: block; overflow: hidden; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.artifact-main strong { color: #313c38; font-size: .8rem; }
.artifact-main small { margin-top: 4px; color: var(--workspace-muted); font-size: .65rem; }
.artifact-job small { color: #929a97; font-size: .58rem; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.artifact-job strong { margin-top: 3px; color: #52605b; font-size: .68rem; font-weight: 650; }
.artifact-date { text-align: right; }
.artifact-date > small { color: var(--workspace-muted); font-size: .63rem; }

.artifact-status {
  display: inline-flex;
  margin-top: 5px;
  padding: 3px 7px;
  border-radius: 99px;
  background: var(--brand-soft);
  color: var(--workspace-accent);
  font-size: .56rem;
  font-weight: 790;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.artifact-open { justify-self: end; }

.artifact-empty {
  padding: 70px 20px;
  border: 1px dashed var(--workspace-line-strong);
  border-radius: 16px;
  background: rgb(255 255 255 / 55%);
  color: var(--workspace-muted);
  font-size: .82rem;
  text-align: center;
}

/* Workspace responsive states */

@media (min-width: 921px) {
  .workspace-content {
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-color: #d2d8d3 transparent;
    scrollbar-width: thin;
  }

  .conversation {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    overflow: visible;
  }

  .conversation-scroll {
    flex: 1 0 auto;
    overflow: visible;
  }

  .composer-wrap {
    position: sticky;
    bottom: 0;
  }

  .job-rail {
    position: sticky;
    z-index: 2;
    top: 0;
    align-self: start;
    max-height: calc(100dvh - var(--workspace-topbar-height));
    overflow: hidden;
  }

  .job-progress-card {
    position: static;
  }
}

@media (max-width: 1180px) {
  .workspace-body { --workspace-sidebar-width: 264px; }
  .workspace-content,
  .twin-profile-layout { grid-template-columns: minmax(0, 1fr) 280px; }
  .conversation-scroll { padding-inline: clamp(22px, 4vw, 54px); }
  .composer-wrap { padding-inline: clamp(22px, 4vw, 54px); }
  .twin-profile-main,
  .artifact-archive { padding-inline: clamp(28px, 5vw, 64px); }
  .skill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 920px) {
  .workspace-body { overflow: auto; }

  .workspace-shell {
    display: block;
    min-height: 100dvh;
  }

  .workspace-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(86vw, 292px);
    transform: translateX(-102%);
    box-shadow: 16px 0 45px rgb(23 32 31 / 16%);
    transition: transform .2s ease;
  }

  .workspace-shell[data-nav-open="true"] .workspace-sidebar { transform: translateX(0); }

  .workspace-scrim {
    position: fixed;
    z-index: 35;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgb(17 28 25 / 42%);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
  }

  .workspace-shell[data-nav-open="true"] .workspace-scrim { opacity: 1; pointer-events: auto; }

  .workspace-main {
    min-height: 100dvh;
    height: auto;
    overflow: visible;
  }

  .workspace-topbar {
    position: sticky;
    top: 0;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 12px;
    padding-inline: 16px 20px;
  }

  .mobile-nav-toggle { display: inline-grid; }

  .workspace-content,
  .twin-profile-layout {
    display: grid;
    height: auto;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .conversation {
    min-height: calc(100dvh - var(--workspace-topbar-height));
    overflow: visible;
  }

  .conversation-scroll {
    min-height: clamp(420px, 58dvh, 680px);
    overflow: visible;
  }

  .composer-wrap { position: sticky; bottom: 0; }

  .job-rail,
  .twin-profile-rail {
    overflow: visible;
    padding: 28px clamp(22px, 5vw, 52px) 82px;
    border-top: 1px solid var(--workspace-line);
    border-left: 0;
  }

  .job-progress-card { width: min(720px, 100%); margin: 0 auto; }

  .twin-profile-main {
    overflow: visible;
    padding-inline: clamp(26px, 7vw, 68px);
  }

  .twin-profile-rail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, .65fr);
    align-items: stretch;
  }

  .profile-account-card { margin-top: 0; }
  .artifact-archive { overflow: visible; }
  .document-editor-button { z-index: 4; right: 18px; bottom: 110px; }
}

@media (max-width: 680px) {
  .workspace-body { --workspace-topbar-height: 66px; }

  .workspace-topbar { gap: 8px; padding-inline: 10px 12px; }
  .active-job-heading > span { display: none; }
  .active-job-heading h1 { font-size: .92rem; }
  .active-twin { gap: 6px; }
  .active-twin-copy { max-width: 92px; }
  .active-twin-copy small { display: none; }
  .workspace-avatar-header { width: 36px; height: 36px; font-size: .7rem; }

  .conversation-scroll { padding: 26px 16px 42px; }
  .composer-wrap { padding: 9px 12px 12px; }
  .workspace-composer { padding: 10px 10px 8px; border-radius: 14px; }
  .memory-destination { display: none; }
  .send-button span { display: none; }
  .send-button { width: 36px; padding-inline: 0; }
  .workspace-message { max-width: 98%; }
  .workspace-message-customer { max-width: 92%; }
  .workspace-empty-state { padding-inline: 5px; }

  .job-rail,
  .twin-profile-rail { padding: 24px 16px 78px; }

  .twin-profile-main { padding: 36px 18px 56px; }
  .twin-profile-identity {
    grid-template-columns: 82px minmax(0, 1fr);
    align-items: start;
    gap: 17px;
  }

  .twin-profile-avatar { width: 82px; height: 82px; font-size: 1.1rem; }
  .twin-profile-copy h2 { font-size: 1.8rem; }
  .twin-role { font-size: .95rem; }
  .expert-links { margin-top: 12px; }
  .twin-profile-tags { grid-column: 1 / -1; }
  .twin-start-job { margin-top: 52px; }
  .twin-start-job > h2 { font-size: 1.75rem; }
  .skill-grid { grid-template-columns: 1fr; }
  .skill-card { min-height: 0; }
  .twin-profile-rail { grid-template-columns: 1fr; }

  .artifact-archive { padding: 35px 16px 72px; }
  .archive-heading { align-items: stretch; flex-direction: column; gap: 20px; }
  .archive-search { width: 100%; }
  .artifact-row {
    grid-template-columns: 42px minmax(0, 1fr) 34px;
    gap: 11px;
    padding: 13px;
  }

  .artifact-job { grid-column: 2 / 3; }
  .artifact-date { grid-column: 2 / 3; text-align: left; }
  .artifact-open { grid-column: 3; grid-row: 1; }
  .document-editor-button { width: 44px; height: 44px; right: 13px; bottom: 110px; }
  .workspace-toast { right: 16px; bottom: 68px; }
}

@media (max-width: 420px) {
  .active-twin-copy { display: none; }
  .twin-profile-identity { grid-template-columns: 1fr; justify-items: start; }
  .twin-profile-avatar { width: 94px; height: 94px; }
  .composer-actions { gap: 2px; }
  .composer-icon-button { width: 32px; height: 32px; }
  .artifact-main small { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  .thinking-indicator > span:first-child { animation-duration: 1.5s; }
}

/* Super Admin workspace ---------------------------------------------------- */

.super-admin-body { --workspace-sidebar-width: 252px; }

.super-admin-brand {
  display: flex;
  min-height: var(--workspace-topbar-height);
  align-items: center;
  gap: 11px;
  padding: 0 20px;
  border-bottom: 1px solid var(--workspace-line);
  background: rgb(255 255 255 / 48%);
}

.super-admin-brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  background: var(--workspace-accent);
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
}

.super-admin-brand strong,
.super-admin-brand small { display: block; line-height: 1.2; }
.super-admin-brand strong { font-size: .82rem; }
.super-admin-brand small {
  margin-top: 2px;
  color: var(--workspace-muted);
  font-size: .59rem;
  font-weight: 760;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.super-admin-sidebar-scroll { padding: 20px 12px; }
.super-admin-navigation { display: grid; gap: 5px; }

.super-admin-nav-item {
  display: grid;
  min-height: 43px;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: #515d59;
  font-size: .78rem;
  font-weight: 680;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.super-admin-nav-item:hover {
  border-color: rgb(20 92 79 / 8%);
  background: rgb(255 255 255 / 62%);
  color: var(--workspace-accent);
}

.super-admin-nav-item.is-active {
  border-color: var(--workspace-line);
  background: #fff;
  box-shadow: 0 1px 2px rgb(23 32 31 / 5%);
  color: var(--workspace-accent);
}

.super-admin-nav-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  color: #64706c;
}

.super-admin-nav-item.is-active .super-admin-nav-icon {
  background: var(--brand-soft);
  color: var(--workspace-accent);
}

.super-admin-nav-icon svg { width: 18px; height: 18px; }
.super-admin-account form { margin: 0; }
.super-admin-logout:hover { background: #f4e8e6; color: #8b3e38; }

.super-admin-topbar {
  grid-template-columns: minmax(120px, 1fr) minmax(0, auto);
  gap: 24px;
}

.super-admin-page-title { min-width: 0; }
.super-admin-page-title h1 {
  overflow: hidden;
  font-size: 1.02rem;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.super-admin-system-statuses {
  display: flex;
  min-width: 0;
  max-width: min(76vw, 900px);
  flex-direction: row-reverse;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.super-admin-system-statuses::-webkit-scrollbar { display: none; }

.super-admin-system-status {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-left: 1px solid var(--workspace-line);
  color: #5f6a66;
  font-size: .61rem;
  font-weight: 680;
  line-height: 1.2;
  white-space: nowrap;
}

.super-admin-system-status:first-child { padding-right: 0; }
.super-admin-system-status:last-child { border-left: 0; }
.super-admin-system-status .status-dot { width: 7px; height: 7px; }

.super-admin-content {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  padding: clamp(38px, 6vw, 80px) clamp(30px, 6vw, 92px) 80px;
  background: #fff;
}

.super-admin-content-heading {
  width: min(1080px, 100%);
  margin: 0 auto 36px;
}

.super-admin-content-heading .eyebrow { margin-bottom: 8px; }
.super-admin-content-heading h2 {
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  font-weight: 650;
  letter-spacing: -.045em;
}

.super-admin-content-heading > p:last-child {
  max-width: 62ch;
  margin: 12px 0 0;
  color: var(--workspace-muted);
  font-size: .88rem;
}

.super-admin-summary-grid {
  display: grid;
  width: min(1080px, 100%);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0 auto 18px;
}

.super-admin-summary-card {
  min-height: 148px;
  padding: 21px;
  border: 1px solid var(--workspace-line);
  border-radius: 16px;
  background: var(--workspace-page);
}

.super-admin-summary-card > span,
.super-admin-summary-card > strong,
.super-admin-summary-card > small { display: block; }

.super-admin-summary-card > span {
  color: var(--workspace-muted);
  font-size: .67rem;
  font-weight: 760;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.super-admin-summary-card > strong {
  margin-top: 15px;
  font-size: 1.85rem;
  font-weight: 650;
  letter-spacing: -.045em;
}

.super-admin-summary-card > small {
  margin-top: 5px;
  color: #7d8783;
  font-size: .66rem;
}

.super-admin-system-overview {
  display: grid;
  width: min(1080px, 100%);
  grid-template-columns: minmax(180px, .42fr) minmax(0, 1fr);
  gap: 34px;
  margin: 0 auto;
  padding: 24px;
  border: 1px solid var(--workspace-line);
  border-radius: 16px;
  background: #fff;
}

.super-admin-system-overview .eyebrow { margin-bottom: 7px; }
.super-admin-system-overview h3 { font-size: 1rem; }
.super-admin-system-list { display: grid; }

.super-admin-system-list > div {
  display: grid;
  min-width: 0;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--workspace-line);
}

.super-admin-system-list > div:first-child { padding-top: 0; }
.super-admin-system-list > div:last-child { padding-bottom: 0; border-bottom: 0; }
.super-admin-system-list strong,
.super-admin-system-list small { display: block; }
.super-admin-system-list strong { font-size: .73rem; }
.super-admin-system-list small {
  overflow: hidden;
  margin-top: 2px;
  color: var(--workspace-muted);
  font-size: .61rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.super-admin-system-state {
  color: var(--workspace-accent);
  font-size: .59rem;
  font-weight: 780;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.super-admin-section-placeholder {
  display: grid;
  width: min(1080px, 100%);
  min-height: 360px;
  align-content: center;
  justify-items: center;
  margin: 0 auto;
  padding: 52px 28px;
  border: 1px dashed var(--workspace-line-strong);
  border-radius: 18px;
  background: var(--workspace-page);
  text-align: center;
}

.super-admin-placeholder-mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 14px;
  background: var(--brand-soft);
  color: var(--workspace-accent);
  font-size: 1.15rem;
  font-weight: 780;
}

.super-admin-section-placeholder h3 { font-size: 1.1rem; }
.super-admin-section-placeholder p {
  max-width: 54ch;
  margin: 9px 0 0;
  color: var(--workspace-muted);
  font-size: .78rem;
}

.super-admin-system-workspace {
  width: min(1080px, 100%);
  margin: 0 auto;
}

.super-admin-content.super-admin-system-content { padding-top: 0; }

.super-admin-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--workspace-line);
  scrollbar-width: none;
}

.super-admin-tabs::-webkit-scrollbar { display: none; }

.super-admin-tab {
  position: relative;
  display: inline-flex;
  min-height: 42px;
  flex: 0 0 auto;
  align-items: center;
  padding: 8px 16px;
  color: #71807b;
  font-size: .72rem;
  font-weight: 710;
  text-decoration: none;
}

.super-admin-tab::after {
  position: absolute;
  right: 12px;
  bottom: -1px;
  left: 12px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: transparent;
  content: "";
}

.super-admin-tab:hover,
.super-admin-tab:focus-visible,
.super-admin-tab.is-active { color: var(--workspace-accent); }
.super-admin-tab.is-active::after { background: var(--workspace-accent); }

.super-admin-tab-placeholder {
  display: grid;
  min-height: 300px;
  align-content: center;
  justify-items: center;
  padding: 48px 28px;
  border: 1px dashed var(--workspace-line-strong);
  border-radius: 18px;
  background: var(--workspace-page);
  text-align: center;
}

.super-admin-tab-placeholder h3 { font-size: 1.1rem; }
.super-admin-tab-placeholder p {
  max-width: 54ch;
  margin: 9px 0 0;
  color: var(--workspace-muted);
  font-size: .78rem;
}

/* Super Admin Role and Skill catalogue ---------------------------------- */

.catalogue-feedback {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid;
  border-radius: 11px;
  font-size: .7rem;
  line-height: 1.5;
}

.catalogue-feedback.is-success {
  border-color: #bcded5;
  background: #edf8f4;
  color: #145c4f;
}

.catalogue-feedback.is-error {
  border-color: #e7c3bd;
  background: #fff3f1;
  color: #8d392f;
}

.catalogue-feedback strong { font-weight: 760; }
.catalogue-feedback ul { margin: 7px 0 0; padding-left: 18px; }

.system-catalogue-layout {
  display: grid;
  grid-template-columns: minmax(235px, .72fr) minmax(0, 2fr);
  gap: 18px;
  align-items: start;
}

.system-catalogue-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.system-catalogue-page-header h3 {
  color: #26312e;
  font-size: 1rem;
}

.system-catalogue-page-header p {
  margin: 6px 0 0;
  color: var(--workspace-muted);
  font-size: .66rem;
  line-height: 1.5;
}

.catalogue-primary-action,
.catalogue-secondary-action,
.catalogue-row-action {
  border-radius: 9px;
  font: inherit;
  font-size: .64rem;
  font-weight: 760;
  cursor: pointer;
}

.catalogue-primary-action {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 9px 15px;
  border: 0;
  background: var(--workspace-accent);
  color: #fff;
}

.catalogue-primary-action:hover,
.catalogue-primary-action:focus-visible { background: #0f5146; }

.catalogue-filter-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 18px;
  padding: 15px;
  border: 1px solid var(--workspace-line);
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 8px 28px rgb(31 47 43 / 4%);
}

.catalogue-filter-bar label {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: #596762;
  font-size: .59rem;
  font-weight: 760;
}

.catalogue-filter-bar select {
  width: 100%;
  min-width: 0;
  min-height: 39px;
  padding: 8px 30px 8px 10px;
  border: 1px solid var(--workspace-line-strong);
  border-radius: 9px;
  background-color: #fbfcfa;
  color: #34413d;
  font-family: inherit;
  font-size: .63rem;
}

.catalogue-filter-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.catalogue-filter-submit {
  min-height: 39px;
  padding: 8px 13px;
  border: 0;
  border-radius: 9px;
  background: var(--workspace-accent);
  color: #fff;
  font: inherit;
  font-size: .63rem;
  font-weight: 760;
  white-space: nowrap;
  cursor: pointer;
}

.catalogue-filter-submit:hover,
.catalogue-filter-submit:focus-visible { background: #0f5146; }

.catalogue-filter-actions a {
  color: var(--workspace-accent);
  font-size: .61rem;
  font-weight: 740;
}

.catalogue-filter-bar > p {
  grid-column: 1 / -1;
  margin: -2px 0 0;
  color: #87918d;
  font-size: .57rem;
  line-height: 1.45;
}

@media (max-width: 1100px) {
  .catalogue-filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalogue-filter-actions { min-height: 39px; }
}

.catalogue-secondary-action,
.catalogue-row-action {
  border: 1px solid var(--workspace-line-strong);
  background: #fff;
  color: #53615c;
}

.catalogue-secondary-action { min-height: 39px; padding: 8px 14px; }
.catalogue-row-action { padding: 6px 10px; }

.catalogue-secondary-action:hover,
.catalogue-secondary-action:focus-visible,
.catalogue-row-action:hover,
.catalogue-row-action:focus-visible {
  border-color: #91aaa3;
  background: #f5f8f6;
  color: var(--workspace-accent);
}

.role-catalogue-groups {
  display: grid;
  gap: 18px;
}

.role-catalogue-group h4,
.system-catalogue-list h4 {
  color: #26312e;
  font-size: .82rem;
}

.role-catalogue-table { min-width: 860px; }

.catalogue-skill-summary {
  display: block;
  max-width: 250px;
  color: #4e5d58;
  line-height: 1.45;
}

.catalogue-skill-summary + .catalogue-skill-summary { margin-top: 5px; }
.catalogue-skill-summary > strong { display: inline; color: #26312e; }

.catalogue-inherited-skills {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid #cfe1dc;
  border-radius: 9px;
  background: #f2f7f5;
  color: #52615c;
  font-size: .59rem;
  line-height: 1.5;
}

.catalogue-inherited-skills > strong { color: var(--workspace-accent); font-size: .63rem; }

.catalogue-skill-count {
  display: inline-grid;
  min-width: 30px;
  min-height: 30px;
  padding: 5px 8px;
  place-items: center;
  border-radius: 999px;
  background: #edf3f1;
  color: var(--workspace-accent);
  font-size: .66rem;
  font-weight: 800;
}

.catalogue-empty-value {
  color: #929c98;
  font-size: .6rem;
  font-weight: 550;
}

.catalogue-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 32px));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--workspace-line-strong);
  border-radius: 17px;
  background: #fff;
  color: #2d3835;
  box-shadow: 0 24px 80px rgb(26 43 38 / 20%);
}

.catalogue-dialog::backdrop {
  background: rgb(27 39 35 / 42%);
  backdrop-filter: blur(2px);
}

.catalogue-dialog[open] { display: block; }

.catalogue-dialog form {
  display: grid;
  max-height: min(760px, calc(100vh - 32px));
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.catalogue-dialog-header,
.catalogue-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 19px;
}

.catalogue-dialog-header { border-bottom: 1px solid var(--workspace-line); }
.catalogue-dialog-header h3 { color: #26312e; font-size: .95rem; }

.catalogue-dialog-header > button {
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #73807b;
  font: inherit;
  font-size: 1.15rem;
  cursor: pointer;
}

.catalogue-dialog-header > button:hover,
.catalogue-dialog-header > button:focus-visible { background: #f0f4f2; color: #26312e; }

.catalogue-dialog-body {
  display: grid;
  gap: 17px;
  padding: 19px;
  overflow-y: auto;
}

.catalogue-field {
  display: grid;
  gap: 7px;
  color: #596762;
  font-size: .62rem;
  font-weight: 720;
}

.catalogue-field select,
.catalogue-field input {
  width: 100%;
  min-width: 0;
  min-height: 41px;
  padding: 9px 10px;
  border: 1px solid var(--workspace-line-strong);
  border-radius: 9px;
  background: #fbfcfa;
  color: #34413d;
  font-family: inherit;
  font-size: .64rem;
}

.catalogue-field input[type="file"] { padding: 7px 8px; }

.catalogue-field input[type="file"]::file-selector-button {
  margin-right: 8px;
  padding: 6px 9px;
  border: 0;
  border-radius: 6px;
  background: #e7f1ee;
  color: var(--workspace-accent);
  font: inherit;
  font-weight: 740;
  cursor: pointer;
}

.catalogue-skill-picker {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.catalogue-skill-picker legend {
  color: #596762;
  font-size: .62rem;
  font-weight: 760;
}

.catalogue-skill-picker > p {
  margin: 5px 0 10px;
  color: #87918d;
  font-size: .59rem;
}

.catalogue-skill-options {
  display: grid;
  gap: 7px;
  max-height: 230px;
  overflow-y: auto;
}

.catalogue-skill-options > label {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--workspace-line);
  border-radius: 9px;
  background: #fbfcfa;
  cursor: pointer;
}

.catalogue-skill-options > label[hidden] { display: none; }
.catalogue-skill-options input { margin: 2px 0 0; accent-color: var(--workspace-accent); }
.catalogue-skill-options strong,
.catalogue-skill-options small { display: block; }
.catalogue-skill-options strong { color: #394641; font-size: .63rem; }
.catalogue-skill-options small { margin-top: 3px; color: #8a9490; font-size: .56rem; line-height: 1.4; }

.catalogue-dialog .system-catalogue-rules {
  margin: 0;
  padding: 12px;
  border-radius: 9px;
  background: #f6f8f6;
  color: #7e8985;
  font-size: .58rem;
  line-height: 1.5;
}

.catalogue-dialog-actions {
  justify-content: flex-end;
  border-top: 1px solid var(--workspace-line);
  background: #fbfcfa;
}

.system-catalogue-upload,
.system-catalogue-list {
  border: 1px solid var(--workspace-line);
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 8px 28px rgb(31 47 43 / 4%);
}

.system-catalogue-upload {
  display: grid;
  gap: 20px;
  padding: 20px;
}

.system-catalogue-kicker {
  display: block;
  margin-bottom: 7px;
  color: var(--workspace-accent);
  font-size: .55rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.system-catalogue-upload h3,
.system-catalogue-list h3 {
  color: #26312e;
  font-size: .96rem;
}

.system-catalogue-upload p,
.system-catalogue-list header p {
  margin: 7px 0 0;
  color: var(--workspace-muted);
  font-size: .65rem;
  line-height: 1.55;
}

.system-catalogue-upload form { display: grid; gap: 13px; }

.system-catalogue-upload label {
  display: grid;
  gap: 6px;
  color: #596762;
  font-size: .61rem;
  font-weight: 720;
}

.system-catalogue-upload select,
.system-catalogue-upload input[type="file"] {
  width: 100%;
  min-width: 0;
  min-height: 39px;
  padding: 9px 10px;
  border: 1px solid var(--workspace-line-strong);
  border-radius: 9px;
  background: #fbfcfa;
  color: #34413d;
  font-family: inherit;
  font-size: .64rem;
}

.system-catalogue-upload input[type="file"] { padding: 7px 8px; }

.system-catalogue-upload input[type="file"]::file-selector-button {
  margin-right: 8px;
  padding: 5px 8px;
  border: 0;
  border-radius: 6px;
  background: #e7f1ee;
  color: var(--workspace-accent);
  font: inherit;
  font-weight: 740;
  cursor: pointer;
}

.catalogue-upload-button {
  min-height: 39px;
  padding: 9px 13px;
  border: 0;
  border-radius: 9px;
  background: var(--workspace-accent);
  color: #fff;
  font: inherit;
  font-size: .66rem;
  font-weight: 760;
  cursor: pointer;
}

.catalogue-upload-button:hover,
.catalogue-upload-button:focus-visible { background: #0f5146; }
.catalogue-upload-button:disabled { cursor: not-allowed; opacity: .5; }

.system-catalogue-upload .system-catalogue-rules {
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid var(--workspace-line);
  color: #85908c;
  font-size: .58rem;
}

.system-catalogue-rules code,
.system-catalogue-table code {
  padding: 1px 4px;
  border-radius: 4px;
  background: #f0f3f0;
  color: #53615c;
  font-size: .92em;
}

.system-catalogue-list { min-width: 0; overflow: hidden; }

.system-catalogue-list > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 19px;
  border-bottom: 1px solid var(--workspace-line);
}

.system-catalogue-list > header > span {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: #edf3f1;
  color: #596762;
  font-size: .56rem;
  font-weight: 760;
}

.system-catalogue-table-wrap { overflow-x: auto; }

.system-catalogue-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  text-align: left;
}

.system-catalogue-table th,
.system-catalogue-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--workspace-line);
  color: #5a6662;
  font-size: .64rem;
  font-weight: 580;
  vertical-align: middle;
}

.system-catalogue-table thead { background: #f7f9f7; }

.system-catalogue-table thead th {
  color: #7b8682;
  font-size: .55rem;
  font-weight: 780;
  letter-spacing: .045em;
  text-transform: uppercase;
  white-space: nowrap;
}

.system-catalogue-table tbody tr:last-child > * { border-bottom: 0; }

.system-catalogue-table tbody th {
  display: grid;
  min-width: 245px;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: #2d3835;
}

.system-catalogue-table tbody th strong,
.system-catalogue-table tbody th small,
.system-catalogue-table td strong,
.system-catalogue-table td small { display: block; }

.system-catalogue-table tbody th strong { font-size: .69rem; font-weight: 750; }

.system-catalogue-table tbody th small {
  overflow: hidden;
  max-width: 285px;
  margin-top: 3px;
  color: #8a9490;
  font-size: .57rem;
  font-weight: 520;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.system-catalogue-table td small { margin-top: 3px; color: #8a9490; font-size: .56rem; }

.system-catalogue-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: #e5efec;
  color: #195f53;
  font-size: .7rem;
  font-weight: 800;
}

.system-catalogue-mark[data-area="HR"] { background: #e7edf3; color: #466176; }
.system-catalogue-mark[data-area="PROFESSIONAL_SERVICES"] { background: #eee8f7; color: #65518e; }

.catalogue-area-pill {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  background: #f0f3f0;
  color: #596762;
  font-size: .57rem;
  font-weight: 720;
  white-space: nowrap;
}

.catalogue-scope-pill {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f0f2f1;
  color: #5f6d68;
  font-size: .56rem;
  font-weight: 760;
  white-space: nowrap;
}

.catalogue-scope-pill[data-scope="DOMAIN"] { background: #e3f0ec; color: #155d50; }

/* Super Admin memory registry -------------------------------------------- */

.memory-registry {
  display: grid;
  width: min(1180px, 100%);
  gap: 30px;
  margin: 0 auto;
}

.memory-registry-group {
  min-width: 0;
}

.memory-registry-group > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 11px;
}

.memory-registry-group > header h3 {
  color: #27322f;
  font-size: .91rem;
  font-weight: 750;
}

.memory-registry-group > header p {
  margin: 4px 0 0;
  color: var(--workspace-muted);
  font-size: .65rem;
}

.memory-registry-group > header > span {
  color: #8a9591;
  font-size: .61rem;
  font-weight: 690;
  white-space: nowrap;
}

.memory-registry-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--workspace-line);
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 8px 28px rgb(31 47 43 / 4%);
}

.memory-registry-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  text-align: left;
}

.memory-registry-table thead {
  background: #f7f9f7;
}

.memory-registry-table th,
.memory-registry-table td {
  padding: 13px 15px;
  border-bottom: 1px solid var(--workspace-line);
  color: #5a6662;
  font-size: .68rem;
  font-weight: 580;
  white-space: nowrap;
}

.memory-registry-table thead th {
  color: #7b8682;
  font-size: .58rem;
  font-weight: 780;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.memory-registry-table thead th:first-child { width: 34%; }
.memory-registry-table tbody tr:last-child > * { border-bottom: 0; }

.memory-registry-table tbody th {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  color: #2d3835;
  white-space: normal;
}

.memory-registry-table tbody th strong,
.memory-registry-table tbody th small {
  display: block;
}

.memory-registry-table tbody th strong {
  font-size: .73rem;
  font-weight: 740;
}

.memory-registry-table tbody th small {
  overflow: hidden;
  max-width: 280px;
  margin-top: 3px;
  color: #8a9490;
  font-size: .59rem;
  font-weight: 530;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.memory-registry-avatar {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  background: #dff0ec;
  color: #145c4f;
  font-size: .7rem;
  font-weight: 800;
}

.memory-registry-avatar[data-memory-kind="companies"] {
  background: #e9e4f5;
  color: #66518f;
}

.memory-registry-avatar[data-memory-kind="users"] {
  border-radius: 50%;
  background: #e7edf3;
  color: #466176;
}

.memory-registry-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #45514d;
  font-size: .61rem;
  font-weight: 720;
}

.memory-registry-status .status-dot { width: 7px; height: 7px; }

.memory-view-button {
  display: inline-flex;
  min-height: 31px;
  align-items: center;
  justify-content: center;
  padding: 6px 13px;
  border: 1px solid var(--workspace-line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--workspace-accent);
  font: inherit;
  font-size: .63rem;
  font-weight: 760;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.memory-view-button:hover {
  border-color: var(--workspace-accent);
  background: var(--workspace-accent);
  color: #fff;
}

/* Super Admin account, Twin, and expert directories ---------------------- */

.admin-directory {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.admin-directory-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--workspace-line);
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 8px 28px rgb(31 47 43 / 4%);
}

.admin-directory-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
  text-align: left;
}

.admin-digital-twins-table { min-width: 1120px; }
.admin-experts-table { min-width: 1040px; }

.admin-directory-table thead { background: #f7f9f7; }

.admin-directory-table th,
.admin-directory-table td {
  padding: 13px 15px;
  border-bottom: 1px solid var(--workspace-line);
  color: #5a6662;
  font-size: .68rem;
  font-weight: 580;
  white-space: nowrap;
}

.admin-directory-table thead th {
  color: #7b8682;
  font-size: .58rem;
  font-weight: 780;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.admin-directory-table thead button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.admin-directory-table thead button:hover,
.admin-directory-table thead button:focus-visible { color: var(--workspace-accent); }

.admin-directory-table thead button span {
  color: #a3aca9;
  font-size: .68rem;
  letter-spacing: 0;
}

.admin-directory-table thead th[aria-sort="ascending"] button,
.admin-directory-table thead th[aria-sort="descending"] button { color: var(--workspace-accent); }

.admin-directory-table thead th:first-child { width: 29%; }
.admin-directory-table tbody tr:last-child > * { border-bottom: 0; }

.admin-directory-table tbody th {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  color: #2d3835;
  white-space: normal;
}

.admin-directory-table tbody th strong,
.admin-directory-table tbody th small { display: block; }

.admin-directory-table tbody th strong {
  font-size: .73rem;
  font-weight: 740;
}

.admin-directory-table tbody th small {
  overflow: hidden;
  max-width: 280px;
  margin-top: 3px;
  color: #8a9490;
  font-size: .59rem;
  font-weight: 530;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-directory-avatar,
.admin-directory-photo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

.admin-directory-avatar {
  display: grid;
  place-items: center;
  background: #e7edf3;
  color: #466176;
  font-size: .72rem;
  font-weight: 800;
}

.admin-directory-photo {
  display: block;
  border: 1px solid #d8e2df;
  background: #e5efec;
  object-fit: cover;
}

.admin-directory-count {
  margin: 10px 2px 0;
  color: #8a9591;
  font-size: .61rem;
  font-weight: 690;
}

.admin-directory-empty {
  height: 120px;
  color: var(--workspace-muted);
  text-align: center;
}

/* Super Admin Company onboarding ---------------------------------------- */

.company-directory,
.company-detail {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.company-directory-table { min-width: 1010px; }
.company-directory-avatar { background: #e3f1ed; color: var(--workspace-accent); }

.company-provisioning-state {
  margin: -7px 0 16px;
  padding: 11px 13px;
  border: 1px solid #eadfc4;
  border-radius: 10px;
  background: #fbf8ef;
  color: #776848;
  font-size: .62rem;
  line-height: 1.5;
}

.company-create-dialog { width: min(650px, calc(100vw - 32px)); }

.company-person-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--workspace-line);
  border-radius: 11px;
}

.company-person-fields legend {
  padding: 0 5px;
  color: #46534f;
  font-size: .64rem;
  font-weight: 780;
}

.company-user-fields { display: grid; gap: 9px; }

.company-user-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 34px;
  align-items: end;
  gap: 9px;
}

.company-user-row > button {
  width: 34px;
  height: 41px;
  padding: 0;
  border: 1px solid var(--workspace-line-strong);
  border-radius: 9px;
  background: #fff;
  color: #7a8581;
  font: inherit;
  font-size: 1rem;
  cursor: pointer;
}

.company-user-row > button:hover,
.company-user-row > button:focus-visible { border-color: #d6a9a2; color: #994b40; }

.company-add-user { width: fit-content; margin-top: 10px; }

.company-detail { display: grid; gap: 18px; }

.company-detail-identity {
  display: flex;
  align-items: center;
  gap: 17px;
  padding: 18px 20px;
  border: 1px solid var(--workspace-line);
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 8px 28px rgb(31 47 43 / 4%);
}

.company-detail-identity img,
.company-logo-placeholder {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  border-radius: 16px;
}

.company-detail-identity img { border: 1px solid var(--workspace-line); object-fit: contain; }

.company-logo-placeholder {
  display: grid;
  place-items: center;
  background: #e3f1ed;
  color: var(--workspace-accent);
  font-size: 1.15rem;
  font-weight: 820;
}

.company-detail-identity h2 { margin: 6px 0 2px; color: #27322f; font-size: 1.25rem; }
.company-detail-identity p { margin: 0; color: var(--workspace-muted); font-size: .62rem; }

.company-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: 18px;
  align-items: start;
}

.company-settings-card,
.company-storage-card,
.company-members-card {
  padding: 19px;
  border: 1px solid var(--workspace-line);
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 8px 28px rgb(31 47 43 / 4%);
}

.company-settings-card > header,
.company-storage-card > header { margin-bottom: 17px; }
.company-settings-card h3,
.company-storage-card h3 { color: #293531; font-size: .82rem; }
.company-settings-card header p,
.company-storage-card header p { margin: 5px 0 0; color: var(--workspace-muted); font-size: .61rem; }
.company-settings-card form { display: grid; gap: 15px; }
.company-settings-card form > button { width: fit-content; }

.company-storage-card dl { display: grid; gap: 10px; margin: 0; }
.company-storage-card dl > div { display: grid; gap: 4px; padding-bottom: 10px; border-bottom: 1px solid var(--workspace-line); }
.company-storage-card dt { color: var(--workspace-muted); font-size: .56rem; font-weight: 760; text-transform: uppercase; }
.company-storage-card dd { margin: 0; overflow-wrap: anywhere; color: #384641; font-size: .65rem; }
.company-storage-card code { font-size: .58rem; }

.company-prefixes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
.company-prefixes code { padding: 5px 7px; border-radius: 6px; background: #f1f5f3; color: #4d5c57; }
.company-members-card { padding: 0; overflow: hidden; }
.company-members-card > header { margin: 0; padding: 18px 19px; border-bottom: 1px solid var(--workspace-line); }
.company-members-card .admin-directory-table-wrap { border: 0; border-radius: 0; box-shadow: none; }

@media (max-width: 900px) {
  .company-detail-grid { grid-template-columns: 1fr; }
  .company-person-fields { grid-template-columns: 1fr; }
  .company-user-row { grid-template-columns: 1fr 34px; }
  .company-user-row > label:first-child { grid-column: 1 / -1; }
}

/* Super Admin memory graph ----------------------------------------------- */

.super-admin-memory-topbar {
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 20px;
  padding-right: 18px;
}

.memory-topbar-breadcrumbs {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: #8a9490;
  font-size: .64rem;
  font-weight: 680;
}

.memory-topbar-breadcrumbs a {
  flex: 0 0 auto;
  color: var(--workspace-accent);
  text-decoration: none;
}

.memory-topbar-breadcrumbs a:hover { text-decoration: underline; }
.memory-topbar-breadcrumbs svg { width: 11px; height: 11px; flex: 0 0 auto; }
.memory-topbar-breadcrumbs h1 {
  overflow: hidden;
  min-width: 0;
  font-size: .88rem;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.memory-topbar-stats {
  display: flex;
  min-width: 0;
  gap: 7px;
  margin: 0;
}

.memory-topbar-stats > div {
  display: grid;
  min-width: 76px;
  grid-template-columns: auto auto;
  align-items: baseline;
  gap: 7px;
  padding: 7px 9px;
  border: 1px solid var(--workspace-line);
  border-radius: 9px;
  background: var(--workspace-page);
}

.memory-topbar-stats dt {
  color: #818c88;
  font-size: .49rem;
  font-weight: 740;
  letter-spacing: .025em;
  text-transform: uppercase;
  white-space: nowrap;
}

.memory-topbar-stats dd {
  margin: 0;
  color: #2c3834;
  font-size: .72rem;
  font-weight: 780;
}

.super-admin-memory-graph-content {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  background: #041e2e;
}

.memory-graph-workspace {
  display: flex;
  width: 100%;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.memory-graph-stage {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
  background: #041e2e;
}

.memory-graph-toolbar {
  position: relative;
  z-index: 10;
  display: flex;
  min-height: 52px;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  overflow-x: auto;
  border-bottom: 1px solid rgb(188 224 219 / 13%);
  background: #062939;
  box-shadow: 0 8px 22px rgb(0 0 0 / 13%);
  scrollbar-width: none;
}

.memory-graph-toolbar::-webkit-scrollbar { display: none; }

.memory-graph-toolbar button,
.memory-graph-search,
.memory-graph-filter select {
  min-height: 33px;
  border: 1px solid rgb(191 225 220 / 18%);
  border-radius: 8px;
  background: rgb(255 255 255 / 7%);
  color: rgb(237 247 245 / 78%);
  font: inherit;
  font-size: .61rem;
  font-weight: 690;
}

.memory-graph-toolbar button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  cursor: pointer;
}

.memory-graph-toolbar button:hover,
.memory-graph-toolbar button[aria-pressed="true"] {
  border-color: rgb(110 213 203 / 52%);
  background: rgb(110 213 203 / 15%);
  color: #8ce0d7;
}

.memory-graph-toolbar button svg { width: 14px; height: 14px; }
.memory-graph-toolbar-spacer { flex: 1; }

.memory-graph-search {
  display: grid;
  width: min(260px, 29vw);
  grid-template-columns: 17px minmax(0, 1fr);
  align-items: center;
  padding: 0 9px;
}

.memory-graph-search svg { width: 15px; height: 15px; color: rgb(221 239 236 / 55%); }

.memory-graph-search input {
  width: 100%;
  min-width: 0;
  padding: 0 4px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #eff8f6;
  font: inherit;
}

.memory-graph-search input::placeholder { color: rgb(221 239 236 / 45%); }

.memory-graph-filter select {
  min-width: 126px;
  padding: 0 26px 0 9px;
  color-scheme: dark;
}

.memory-graph-bounded {
  flex: 0 0 auto;
  padding: 4px 7px;
  border: 1px solid rgb(245 195 91 / 22%);
  border-radius: 999px;
  color: rgb(245 213 145 / 72%);
  font-size: .5rem;
  font-weight: 740;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.memory-graph-canvas-wrap {
  position: relative;
  min-height: 0;
  flex: 1;
  overflow: hidden;
  background:
    radial-gradient(circle at 28% 24%, rgb(23 104 113 / 32%), transparent 34%),
    linear-gradient(145deg, #062c39, #041e2e 70%);
}

.memory-graph-canvas,
.memory-graph-canvas canvas,
.memory-graph-canvas svg {
  width: 100% !important;
  height: 100% !important;
}

.memory-graph-canvas {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: hidden;
}

.memory-graph-canvas canvas {
  display: block;
}

.memory-graph-canvas .undefined {
  display: none !important;
}

.memory-graph-canvas .cosmo-hover-label {
  z-index: 3;
  background: none !important;
  color: #ffd76a !important;
  font-size: 13px;
  font-weight: 600;
  opacity: 1 !important;
  text-shadow: 0 1px 4px rgb(0 0 0 / 90%);
  transition: none !important;
  animation: none !important;
}

.memory-graph-canvas [class*="label"] {
  transition: none !important;
  animation: none !important;
}

.memory-graph-hull-layer {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.memory-graph-top-layer {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.memory-graph-single-node {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  display: grid;
  max-width: min(360px, 80%);
  justify-items: center;
  gap: 9px;
  padding: 18px;
  border: 0;
  background: transparent;
  color: #edf8f6;
  cursor: pointer;
  transform: translate(-50%, -50%);
}

.memory-graph-single-node i {
  width: 22px;
  height: 22px;
  border: 4px solid rgb(255 255 255 / 14%);
  border-radius: 50%;
  box-shadow: 0 0 24px rgb(110 213 203 / 34%);
}

.memory-graph-single-node span {
  overflow: hidden;
  max-width: 100%;
  font-size: .79rem;
  font-weight: 720;
  text-align: center;
  text-overflow: ellipsis;
  text-shadow: 0 2px 8px #00151f;
  white-space: nowrap;
}

.memory-graph-single-node small {
  color: rgb(223 241 238 / 58%);
  font-size: .56rem;
  font-weight: 720;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.memory-graph-toolbar button:disabled {
  cursor: not-allowed;
  opacity: .44;
}

.memory-graph-loading,
.memory-graph-empty {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-content: center;
  justify-items: center;
  color: rgb(237 247 245 / 88%);
  text-align: center;
}

.memory-graph-loading[hidden],
.memory-graph-empty[hidden] { display: none; }

.memory-graph-loading > span {
  width: 22px;
  height: 22px;
  margin-bottom: 12px;
  border: 2px solid rgb(255 255 255 / 22%);
  border-top-color: #62d3ca;
  border-radius: 50%;
  animation: memory-graph-spin .8s linear infinite;
}

.memory-graph-loading strong,
.memory-graph-empty strong { font-size: .76rem; }
.memory-graph-loading small,
.memory-graph-empty span { margin-top: 5px; color: rgb(221 237 234 / 58%); font-size: .61rem; }

@keyframes memory-graph-spin { to { transform: rotate(360deg); } }

.memory-graph-inspector {
  position: absolute;
  z-index: 8;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  width: min(370px, 100%);
  flex-direction: column;
  overflow: hidden;
  border-left: 1px solid rgb(194 230 224 / 19%);
  background: rgb(3 24 35 / 96%);
  box-shadow: -18px 0 40px rgb(0 0 0 / 22%);
  color: #edf7f5;
  backdrop-filter: blur(12px);
}

.memory-graph-inspector[hidden] { display: none; }

.memory-graph-inspector-header {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 17px 16px;
  border-bottom: 1px solid rgb(255 255 255 / 9%);
}

.memory-graph-inspector-header > div { min-width: 0; }

.memory-graph-inspector-header > button {
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: rgb(236 248 246 / 68%);
  font-size: 1.05rem;
  cursor: pointer;
}

.memory-graph-inspector-header > button:hover { background: rgb(255 255 255 / 9%); }
.memory-graph-inspector-header span {
  display: block;
  color: #6ed5cb;
  font-size: .54rem;
  font-weight: 780;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.memory-graph-inspector h3 {
  overflow-wrap: anywhere;
  margin-top: 7px;
  font-size: .9rem;
  line-height: 1.35;
}

.memory-graph-inspector-body {
  display: grid;
  min-height: 0;
  flex: 1;
  gap: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.memory-graph-inspector-body > section,
.memory-graph-technical {
  padding: 16px 17px;
  border-bottom: 1px solid rgb(255 255 255 / 8%);
}

.memory-graph-inspector-body h4,
.memory-graph-technical summary {
  margin: 0 0 9px;
  color: rgb(222 240 237 / 52%);
  font-size: .53rem;
  font-weight: 780;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.memory-graph-technical summary { margin: 0; cursor: pointer; }
.memory-graph-technical[open] summary { margin-bottom: 12px; }
.memory-graph-inspector p {
  margin: 0;
  color: rgb(234 245 243 / 78%);
  font-size: .66rem;
  line-height: 1.62;
  white-space: pre-wrap;
}
.memory-graph-inspector dl { display: grid; gap: 8px; margin: 0; }
.memory-graph-inspector dl > div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 9px;
  border-top: 1px solid rgb(255 255 255 / 7%);
  padding-top: 8px;
}
.memory-graph-inspector dl > div:first-child { border-top: 0; padding-top: 0; }
.memory-graph-inspector dt { color: rgb(219 237 233 / 48%); font-size: .56rem; }
.memory-graph-inspector dd { overflow-wrap: anywhere; margin: 0; color: rgb(241 249 247 / 82%); font-size: .58rem; }

.memory-graph-connections { display: grid; gap: 6px; }

.memory-graph-connections button {
  display: grid;
  width: 100%;
  gap: 2px;
  padding: 9px 10px;
  border: 1px solid rgb(191 225 220 / 13%);
  border-radius: 8px;
  background: rgb(255 255 255 / 5%);
  color: rgb(241 249 247 / 86%);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.memory-graph-connections button:hover {
  border-color: rgb(110 213 203 / 40%);
  background: rgb(110 213 203 / 10%);
}

.memory-graph-connections span { overflow-wrap: anywhere; font-size: .61rem; font-weight: 720; }
.memory-graph-connections small { color: rgb(219 237 233 / 48%); font-size: .52rem; }

.memory-graph-data { color: rgb(241 249 247 / 82%); font-size: .59rem; line-height: 1.5; }
.memory-graph-data > dl { gap: 9px; }
.memory-graph-data ul { display: grid; gap: 4px; margin: 0; padding-left: 17px; }

.memory-graph-inspector-footer {
  display: flex;
  min-height: 53px;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  padding: 10px 17px;
  border-top: 1px solid rgb(255 255 255 / 9%);
}

.memory-graph-inspector-footer button {
  padding: 7px 10px;
  border: 1px solid rgb(110 213 203 / 30%);
  border-radius: 7px;
  background: rgb(110 213 203 / 10%);
  color: #8ce0d7;
  font: inherit;
  font-size: .56rem;
  font-weight: 720;
  cursor: pointer;
}

.memory-graph-inspector-footer span { color: rgb(219 237 233 / 50%); font-size: .52rem; }

.memory-graph-legend {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 13px;
  display: flex;
  max-width: calc(100% - 150px);
  flex-wrap: wrap;
  gap: 5px 11px;
  padding: 8px 10px;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 9px;
  background: rgb(3 23 34 / 67%);
  color: rgb(236 247 245 / 72%);
  font-size: .52rem;
  transform: translateX(-50%);
  backdrop-filter: blur(8px);
}

.memory-graph-legend:empty { display: none; }
.memory-graph-legend > span { display: inline-flex; align-items: center; gap: 5px; }
.memory-graph-legend i { width: 7px; height: 7px; border-radius: 50%; }

@media (max-width: 1080px) {
  .super-admin-system-status { padding-inline: 8px; }
  .super-admin-system-status > span:nth-child(2) {
    overflow: hidden;
    max-width: 92px;
    text-overflow: ellipsis;
  }
}

@media (max-width: 920px) {
  .super-admin-content { overflow: visible; padding-inline: clamp(22px, 5vw, 52px); }
  .super-admin-system-statuses { max-width: 58vw; }
  .system-catalogue-layout { grid-template-columns: 1fr; }
  .system-catalogue-upload { grid-template-columns: minmax(0, .8fr) minmax(300px, 1.2fr); }
  .system-catalogue-upload .system-catalogue-rules { grid-column: 1 / -1; }
  .super-admin-memory-graph-content { overflow: hidden; padding: 0; }
  .memory-topbar-stats {
    max-width: 58vw;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .memory-topbar-stats::-webkit-scrollbar { display: none; }
}

@media (max-width: 680px) {
  .super-admin-topbar { grid-template-columns: 40px minmax(0, 1fr); }
  .super-admin-memory-topbar { grid-template-columns: 40px minmax(110px, 1fr) minmax(0, auto); gap: 7px; padding-inline: 9px; }
  .super-admin-page-title { display: none; }
  .super-admin-system-statuses { max-width: none; grid-column: 2; }
  .super-admin-system-status { padding-inline: 7px; font-size: .56rem; }
  .super-admin-content { padding: 34px 16px 56px; }
  .super-admin-content-heading { margin-bottom: 25px; }
  .super-admin-summary-grid { grid-template-columns: 1fr; }
  .super-admin-summary-card { min-height: 122px; }
  .super-admin-system-overview { grid-template-columns: 1fr; gap: 20px; padding: 18px; }
  .memory-registry-group > header { align-items: start; }
  .super-admin-memory-graph-content { min-height: calc(100vh - var(--workspace-topbar-height)); padding: 0; }
  .memory-topbar-breadcrumbs { gap: 5px; }
  .memory-topbar-breadcrumbs a { display: none; }
  .memory-topbar-breadcrumbs svg { display: none; }
  .memory-topbar-stats { max-width: 42vw; gap: 5px; }
  .memory-topbar-stats > div { min-width: 63px; padding: 6px 7px; }
  .memory-topbar-stats dt { font-size: .44rem; }
  .memory-graph-toolbar { overflow-x: auto; padding-inline: 9px; scrollbar-width: none; }
  .memory-graph-toolbar::-webkit-scrollbar { display: none; }
  .memory-graph-search { width: 180px; flex: 0 0 180px; }
  .memory-graph-toolbar-spacer { display: none; }
  .memory-graph-legend { max-width: calc(100% - 26px); bottom: 36px; }
  .memory-graph-inspector {
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: min(330px, 100%);
    max-height: none;
  }
}

/* Mobile application and PWA foundation ---------------------------------- */

:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

html {
  min-width: 320px;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body { min-height: 100svh; }
[hidden] { display: none !important; }
img, svg { max-width: 100%; }

.site-header {
  padding-top: calc(.75rem + var(--safe-top));
  padding-right: max(clamp(1rem, 4vw, 4rem), var(--safe-right));
  padding-left: max(clamp(1rem, 4vw, 4rem), var(--safe-left));
}

.site-nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--ink);
}

.site-nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: currentcolor;
}

.site-nav-toggle span + span { margin-top: 4px; }

.site-nav-toggle:focus-visible,
.pwa-install-action:focus-visible,
.pwa-install-dismiss:focus-visible {
  outline: 3px solid rgb(20 92 79 / 22%);
  outline-offset: 2px;
}

.site-footer {
  padding-right: max(clamp(1rem, 4vw, 4rem), var(--safe-right));
  padding-bottom: calc(1.3rem + var(--safe-bottom));
  padding-left: max(clamp(1rem, 4vw, 4rem), var(--safe-left));
}

.pwa-install-card {
  position: fixed;
  z-index: 120;
  right: max(18px, var(--safe-right));
  bottom: max(18px, var(--safe-bottom));
  display: grid;
  width: min(410px, calc(100vw - max(36px, var(--safe-left)) - max(36px, var(--safe-right))));
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid rgb(20 92 79 / 18%);
  border-radius: 17px;
  background: rgb(255 254 250 / 97%);
  box-shadow: 0 18px 55px rgb(23 32 31 / 22%);
  backdrop-filter: blur(18px);
}

.pwa-install-card img { border-radius: 12px; }
.pwa-install-card strong { display: block; font-size: .88rem; }
.pwa-install-card p { margin: 2px 0 0; color: var(--muted); font-size: .72rem; line-height: 1.35; }

.pwa-install-action {
  min-height: 42px;
  padding: 8px 13px;
  border: 0;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-size: .76rem;
  font-weight: 760;
}

.pwa-install-dismiss {
  position: absolute;
  top: -11px;
  right: -9px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1;
}

.offline-body {
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: calc(24px + var(--safe-top)) max(20px, var(--safe-right)) calc(24px + var(--safe-bottom)) max(20px, var(--safe-left));
}

.offline-shell {
  width: min(560px, 100%);
  padding: clamp(28px, 8vw, 56px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}

.offline-shell img { margin-bottom: 24px; border-radius: 18px; }
.offline-shell h1 { max-width: none; font-size: clamp(2.2rem, 10vw, 3.8rem); }
.offline-shell > p:not(.eyebrow) { max-width: 46ch; margin: 0 auto 24px; color: var(--muted); }

.workspace-navigation-open { overflow: hidden !important; overscroll-behavior: none; }

.workspace-body:not(.memory-graph-body) .workspace-sidebar {
  padding-bottom: var(--safe-bottom);
}

.workspace-body:not(.memory-graph-body) .workspace-topbar {
  padding-top: var(--safe-top);
}

.workspace-body:not(.memory-graph-body) .composer-wrap {
  padding-bottom: calc(17px + var(--safe-bottom));
}

.workspace-body:not(.memory-graph-body) .document-editor-button {
  bottom: calc(110px + var(--safe-bottom));
}

.workspace-body:not(.memory-graph-body) .workspace-toast {
  bottom: calc(68px + var(--safe-bottom));
}

@media (display-mode: standalone) {
  .pwa-install-card { display: none !important; }
}

@media (max-width: 650px) {
  .site-header {
    display: grid;
    min-height: calc(68px + var(--safe-top));
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    padding: calc(8px + var(--safe-top)) max(10px, var(--safe-right)) 8px max(10px, var(--safe-left));
  }

  .brand { min-width: 0; }
  .brand-mark { width: 42px; height: 42px; }
  .site-nav-toggle { display: grid; }

  .primary-nav,
  .primary-nav-end {
    display: flex;
    width: 100%;
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
    margin: 0;
    padding: 8px 0 2px;
    overflow: visible;
    border-top: 1px solid var(--line);
  }

  .site-header[data-site-nav-open="false"] .primary-nav { display: none; }
  .site-header[data-site-nav-open="true"] .primary-nav { display: flex; }
  .primary-nav a { display: flex; min-height: 44px; align-items: center; padding: 10px 12px; font-size: .9rem; }

  .persona-chip {
    min-width: 0;
    grid-column: 1 / -1;
    justify-content: space-between;
    margin: 0;
    padding: 7px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .persona-chip strong {
    overflow: hidden;
    max-width: 68vw;
    margin: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .text-button { min-width: 44px; min-height: 44px; padding: 8px; }
  .page-shell { min-height: calc(100svh - 138px); padding: 34px 0 52px; }
  .page-heading { gap: 16px; margin-bottom: 28px; }
  .page-heading h1 { font-size: clamp(2.1rem, 12vw, 3.15rem); overflow-wrap: anywhere; }
  .lead { font-size: 1rem; }
  .hero { padding-bottom: 36px; }
  .hero h1 { overflow-wrap: anywhere; }
  .auth-panel, .panel, .persona-card { padding: 18px; border-radius: 15px; }
  .persona-card { min-height: 0; }
  .button, input, select { min-height: 44px; }
  input, select, textarea { font-size: 16px; }
  .button-small { min-height: 44px; }
  .filter-bar { padding: 13px; }
  .filter-bar .button, .form-stack > .button { width: 100%; }
  .status-row { grid-template-columns: auto minmax(0, 1fr); align-items: start; padding: 16px; }
  .status-row > strong { grid-column: 2; }
  .proposal-meta { align-items: flex-start; flex-direction: column; }
  .prompt { padding-inline: 4px; }
  .site-footer { gap: 6px; padding-top: 18px; }

  .memory-table-wrap { overflow: visible; border: 0; background: transparent; }
  .memory-table, .memory-table tbody, .memory-table tr, .memory-table td { display: block; width: 100%; }
  .memory-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .memory-table tbody { display: grid; gap: 12px; }
  .memory-table tr {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: 0 8px 24px rgb(31 46 42 / 4%);
  }
  .memory-table td {
    max-width: none;
    padding: 11px 14px;
    border-top: 1px solid #e8eae5;
    overflow-wrap: anywhere;
  }
  .memory-table td:first-child { border-top: 0; }
  .memory-table td:not(:first-child) { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
  .memory-table td::before {
    flex: 0 0 auto;
    color: var(--muted);
    content: attr(data-label);
    font-size: .68rem;
    font-weight: 780;
    letter-spacing: .05em;
    text-transform: uppercase;
  }
  .memory-table td:first-child::before { display: block; margin-bottom: 7px; }
  .memory-table .empty-cell { padding: 30px 18px; text-align: center; }
  .memory-table .empty-cell::before { display: none; }

  .pwa-install-card {
    right: max(12px, var(--safe-right));
    bottom: max(12px, var(--safe-bottom));
    left: max(12px, var(--safe-left));
    width: auto;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 12px;
  }
  .pwa-install-card img { width: 44px; height: 44px; }
  .pwa-install-action { min-height: 44px; }
}

@media (max-width: 920px) {
  .workspace-body:not(.memory-graph-body) {
    --workspace-topbar-height: calc(76px + var(--safe-top));
  }

  .workspace-body:not(.memory-graph-body) .workspace-sidebar:not(.super-admin-sidebar) {
    height: 100dvh;
    padding-top: var(--safe-top);
  }

  .workspace-body:not(.memory-graph-body) .workspace-topbar {
    padding-right: max(20px, var(--safe-right));
    padding-left: max(16px, var(--safe-left));
  }

  .workspace-body:not(.memory-graph-body) .workspace-scrim { height: 100dvh; }
}

@media (max-width: 680px) {
  .workspace-body:not(.memory-graph-body) {
    --workspace-topbar-height: calc(66px + var(--safe-top));
    font-size: 16px;
  }

  .workspace-body:not(.memory-graph-body) input,
  .workspace-body:not(.memory-graph-body) select,
  .workspace-body:not(.memory-graph-body) textarea { font-size: 16px; }

  .workspace-body:not(.memory-graph-body) small { font-size: .72rem; }

  .workspace-body:not(.memory-graph-body) .workspace-topbar {
    padding-right: max(12px, var(--safe-right));
    padding-left: max(10px, var(--safe-left));
  }

  .workspace-body:not(.memory-graph-body) .mobile-nav-toggle,
  .workspace-body:not(.memory-graph-body) .composer-icon-button,
  .workspace-body:not(.memory-graph-body) .send-button,
  .workspace-body:not(.memory-graph-body) .account-action,
  .workspace-body:not(.memory-graph-body) .document-editor-button {
    min-width: 44px;
    min-height: 44px;
  }

  .workspace-body:not(.memory-graph-body) .document-editor-button {
    bottom: calc(156px + var(--safe-bottom));
  }

  .workspace-body:not(.memory-graph-body) .composer-wrap {
    padding-bottom: calc(10px + var(--safe-bottom));
  }

  .workspace-body:not(.memory-graph-body) .workspace-composer { background: #f7f8f5; }
  .workspace-body:not(.memory-graph-body) .conversation-scroll { min-height: clamp(360px, 54dvh, 620px); }
  .workspace-body:not(.memory-graph-body) .job-rail,
  .workspace-body:not(.memory-graph-body) .twin-profile-rail { padding-bottom: calc(78px + var(--safe-bottom)); }

  .super-admin-body:not(.memory-graph-body) .super-admin-content { padding-right: max(16px, var(--safe-right)); padding-left: max(16px, var(--safe-left)); }
  .super-admin-body:not(.memory-graph-body) .catalogue-filter-bar { grid-template-columns: 1fr; padding: 14px; }
  .super-admin-body:not(.memory-graph-body) .catalogue-filter-actions { justify-content: space-between; }
  .super-admin-body:not(.memory-graph-body) .catalogue-filter-submit { min-height: 44px; }
  .super-admin-body:not(.memory-graph-body) .memory-registry-table-wrap,
  .super-admin-body:not(.memory-graph-body) .admin-directory-table-wrap,
  .super-admin-body:not(.memory-graph-body) .system-catalogue-table-wrap { overflow: visible; border: 0; background: transparent; box-shadow: none; }
  .super-admin-body:not(.memory-graph-body) .memory-registry-table,
  .super-admin-body:not(.memory-graph-body) .admin-directory-table,
  .super-admin-body:not(.memory-graph-body) .system-catalogue-table { display: block; min-width: 0; }
  .super-admin-body:not(.memory-graph-body) .memory-registry-table thead,
  .super-admin-body:not(.memory-graph-body) .admin-directory-table thead,
  .super-admin-body:not(.memory-graph-body) .system-catalogue-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .super-admin-body:not(.memory-graph-body) .memory-registry-table tbody,
  .super-admin-body:not(.memory-graph-body) .admin-directory-table tbody,
  .super-admin-body:not(.memory-graph-body) .system-catalogue-table tbody { display: grid; gap: 12px; }
  .super-admin-body:not(.memory-graph-body) .memory-registry-table tbody tr,
  .super-admin-body:not(.memory-graph-body) .admin-directory-table tbody tr,
  .super-admin-body:not(.memory-graph-body) .system-catalogue-table tbody tr {
    display: block;
    overflow: hidden;
    border: 1px solid var(--workspace-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 24px rgb(31 47 43 / 5%);
  }
  .super-admin-body:not(.memory-graph-body) .memory-registry-table tbody th,
  .super-admin-body:not(.memory-graph-body) .admin-directory-table tbody th,
  .super-admin-body:not(.memory-graph-body) .system-catalogue-table tbody th {
    display: grid;
    width: 100%;
    grid-template-columns: 42px minmax(0, 1fr);
    padding: 14px;
    border: 0;
  }
  .super-admin-body:not(.memory-graph-body) .memory-registry-table tbody td,
  .super-admin-body:not(.memory-graph-body) .admin-directory-table tbody td,
  .super-admin-body:not(.memory-graph-body) .system-catalogue-table tbody td {
    display: flex;
    width: 100%;
    max-width: none;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 11px 14px;
    border-top: 1px solid var(--workspace-line);
    border-bottom: 0;
    font-size: .78rem;
    text-align: right;
    white-space: normal;
  }
  .super-admin-body:not(.memory-graph-body) .memory-registry-table tbody td::before,
  .super-admin-body:not(.memory-graph-body) .admin-directory-table tbody td::before,
  .super-admin-body:not(.memory-graph-body) .system-catalogue-table tbody td::before {
    flex: 0 0 auto;
    color: #7b8682;
    content: attr(data-label);
    font-size: .63rem;
    font-weight: 780;
    letter-spacing: .04em;
    text-align: left;
    text-transform: uppercase;
  }
  .super-admin-body:not(.memory-graph-body) .system-catalogue-layout { gap: 14px; }
  .super-admin-body:not(.memory-graph-body) .system-catalogue-upload { display: grid; grid-template-columns: 1fr; padding: 17px; }
  .super-admin-body:not(.memory-graph-body) .system-catalogue-upload .system-catalogue-rules { grid-column: auto; }
  .super-admin-body:not(.memory-graph-body) .system-catalogue-list { overflow: visible; border: 0; background: transparent; box-shadow: none; }
  .super-admin-body:not(.memory-graph-body) .system-catalogue-list > header { margin-bottom: 12px; padding: 0 2px 12px; }
  .super-admin-body:not(.memory-graph-body) .system-catalogue-table tbody th { min-width: 0; padding: 14px; border: 0; }
  .super-admin-body:not(.memory-graph-body) .system-catalogue-table tbody th small { max-width: none; white-space: normal; }
  .super-admin-body:not(.memory-graph-body) .system-catalogue-table .admin-directory-empty { display: block; min-width: 0; padding: 30px 18px; text-align: center; }
  .super-admin-body:not(.memory-graph-body) .admin-directory-empty {
    display: block !important;
    height: auto;
    padding: 34px 18px !important;
    border: 0 !important;
    text-align: center !important;
  }
  .super-admin-body:not(.memory-graph-body) .admin-directory-empty::before { display: none; }
  .super-admin-body:not(.memory-graph-body) .memory-view-button { min-height: 44px; padding-inline: 16px; }
  .super-admin-body:not(.memory-graph-body) .super-admin-tabs { scroll-snap-type: x proximity; }
  .super-admin-body:not(.memory-graph-body) .super-admin-tab { min-height: 44px; scroll-snap-align: start; }
  .super-admin-body:not(.memory-graph-body) .super-admin-nav-item { min-height: 48px; }
}

/* Mobile chat frame and progress drawer ---------------------------------- */

.job-panel-toggle,
.job-panel-scrim {
  display: none;
}

@media (max-width: 920px) {
  .chat-workspace-body {
    --chat-viewport-height: 100dvh;
    height: var(--chat-viewport-height);
    overflow: hidden;
    overscroll-behavior: none;
  }

  html.standalone-display .chat-workspace-body {
    --chat-viewport-height: 100lvh;
  }

  .chat-workspace-body .workspace-shell {
    display: block;
    width: 100%;
    height: var(--chat-viewport-height);
    min-height: 0;
    overflow: hidden;
  }

  .chat-workspace-body .workspace-main {
    min-height: 0;
    height: var(--chat-viewport-height);
    grid-template-rows: var(--workspace-topbar-height) minmax(0, 1fr);
    overflow: hidden;
  }

  .chat-workspace-body .workspace-topbar {
    position: relative;
    z-index: 36;
    grid-template-columns: 44px minmax(0, 1fr) auto 44px;
    gap: 8px;
  }

  .chat-workspace-body .platform-admin-chat-workspace .workspace-topbar {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .chat-workspace-body .workspace-content {
    position: relative;
    display: grid;
    min-height: 0;
    height: 100%;
    grid-template-columns: minmax(0, 1fr);
    overflow: hidden;
  }

  .chat-workspace-body .conversation {
    min-height: 0;
    height: 100%;
    grid-template-rows: minmax(0, 1fr) auto;
    overflow: hidden;
  }

  .chat-workspace-body .conversation-scroll {
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .chat-workspace-body .composer-wrap {
    position: relative;
    bottom: auto;
    flex: none;
  }

  .chat-workspace-body .job-panel-toggle {
    position: relative;
    display: inline-grid;
    width: 44px;
    height: 44px;
    grid-column: -2 / -1;
    place-items: center;
  }

  .chat-workspace-body .job-panel-toggle[aria-expanded="true"] {
    background: var(--brand-soft);
    color: var(--workspace-accent);
  }

  .chat-workspace-body .job-panel-toggle svg {
    width: 21px;
    height: 21px;
  }

  .chat-workspace-body .job-rail {
    position: fixed;
    z-index: 34;
    top: var(--workspace-topbar-height);
    right: 0;
    bottom: 0;
    width: min(88vw, 360px);
    max-height: none;
    padding: 0 18px calc(18px + var(--safe-bottom));
    overflow-x: hidden;
    overflow-y: auto;
    border-top: 0;
    background: var(--workspace-panel);
    box-shadow: -18px 0 50px rgb(17 28 25 / 18%);
    transform: translateX(105%);
    transition: transform .2s ease;
    overscroll-behavior: contain;
  }

  .chat-workspace-body .workspace-shell[data-job-panel-open="true"] .job-rail {
    transform: translateX(0);
  }

  .chat-workspace-body .job-progress-card {
    width: 100%;
    margin: 18px 0 0;
  }

  .chat-workspace-body .job-panel-scrim {
    position: fixed;
    z-index: 33;
    top: var(--workspace-topbar-height);
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    width: 100%;
    height: auto;
    padding: 0;
    border: 0;
    background: rgb(17 28 25 / 42%);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
  }

  .chat-workspace-body .workspace-shell[data-job-panel-open="true"] .job-panel-scrim {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 680px) {
  .chat-workspace-body .active-twin-copy,
  .chat-workspace-body .active-company-copy {
    display: none;
  }

  .chat-workspace-body .conversation-scroll {
    min-height: 0;
  }

  .chat-workspace-body .job-rail {
    padding-bottom: calc(18px + var(--safe-bottom));
  }
}
.voice-session-panel {
  align-items: center;
  background: #f1f8f6;
  border: 1px solid #b7d9d1;
  border-radius: 12px;
  color: #174b40;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0 0 0.65rem;
  padding: 0.65rem 0.8rem;
}

.voice-session-panel[hidden] {
  display: none;
}

.voice-recording-dot {
  animation: voice-recording-pulse 1.4s ease-in-out infinite;
  background: #c83333;
  border-radius: 50%;
  height: 0.7rem;
  width: 0.7rem;
}

.voice-session-panel [data-voice-status] {
  flex: 1 1 12rem;
}

.voice-session-panel button,
.voice-terms-actions button {
  border: 1px solid #8ab8ad;
  border-radius: 8px;
  cursor: pointer;
  min-height: 2.25rem;
  padding: 0.4rem 0.7rem;
}

.voice-stop {
  background: #8e2f2f;
  border-color: #8e2f2f !important;
  color: #fff;
}

.voice-terms-dialog {
  border: 0;
  border-radius: 16px;
  box-shadow: 0 24px 70px rgb(22 52 46 / 22%);
  max-width: min(42rem, calc(100vw - 2rem));
  padding: 1.25rem;
}

.voice-terms-dialog::backdrop {
  background: rgb(10 31 27 / 55%);
}

.voice-terms-content {
  background: #f7f9f8;
  border: 1px solid #d7e1de;
  border-radius: 10px;
  max-height: 45vh;
  overflow: auto;
  padding: 1rem;
  white-space: pre-wrap;
}

.voice-terms-consent {
  align-items: flex-start;
  display: flex;
  gap: 0.6rem;
  margin-top: 1rem;
}

.voice-headset-note {
  color: #53645f;
  font-size: 0.9rem;
}

.voice-terms-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

@keyframes voice-recording-pulse {
  50% { box-shadow: 0 0 0 5px rgb(200 51 51 / 15%); }
}


/* Expert-owned public profile and role skills. */
.expert-avatar-image { object-fit: cover; border-radius: 50%; flex-shrink: 0; }
.expert-settings-page { max-width: 920px; margin: 0 auto; padding: 20px 0 64px; }
.expert-settings-back { display: inline-block; margin-bottom: 24px; color: var(--muted); font-size: .88rem; }
.expert-settings-heading { margin-bottom: 28px; }
.expert-settings-heading h1 { margin: 8px 0 12px; font-size: clamp(2rem, 4vw, 2.65rem); }
.expert-settings-card { margin: 20px 0; padding: 30px; background: var(--surface, #fff); border: 1px solid var(--border, #e1e5e2); border-radius: 16px; }
.expert-settings-section-heading h2 { margin: 0 0 8px; font-size: 1.28rem; }
.expert-settings-section-heading p { color: var(--muted); margin: 0; line-height: 1.6; }
.expert-profile-fields { display: grid; gap: 26px; margin: 26px 0; }
.expert-photo-field { display: flex; gap: 24px; align-items: center; }
.expert-settings-photo { width: 100px; height: 100px; object-fit: cover; border-radius: 50%; background: #eef1ef; }
.expert-photo-field label, .expert-name-field { display: block; font-weight: 600; }
.expert-photo-field input[type="file"] { display: block; margin: 10px 0; max-width: 100%; font-size: .85rem; }
.expert-photo-field small { display: block; color: var(--muted); font-size: .8rem; }
.expert-photo-field .expert-remove-photo { margin-top: 12px; font-size: .85rem; font-weight: 400; }
.expert-name-field input { display: block; width: 100%; max-width: 520px; margin-top: 8px; padding: 12px 14px; border: 1px solid var(--border, #ccd5cf); border-radius: 8px; font: inherit; background: #fff; }
.expert-skills-heading { margin: 42px 0 22px; }
.expert-role-heading { display: flex; gap: 20px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.expert-role-heading h3 { margin: 0; font-size: 1.2rem; }
.expert-role-heading > span { white-space: nowrap; color: var(--muted); font-size: .85rem; }
.expert-skill-choices { border: 0; margin: 0; padding: 0; }
.expert-skill-choice { display: flex; gap: 15px; align-items: flex-start; padding: 19px 0; border-top: 1px solid var(--border, #e1e5e2); cursor: pointer; }
.expert-skill-choice input { width: 18px; height: 18px; flex-shrink: 0; margin: 3px 0 0; accent-color: var(--brand, #236c53); }
.expert-skill-choice > span { display: grid; gap: 6px; }
.expert-skill-choice strong { font-size: .96rem; }
.expert-skill-choice span span { line-height: 1.5; font-size: .88rem; color: var(--muted); }
.expert-skill-choice small { font-size: .75rem; color: var(--muted); }
.expert-settings-card footer { display: flex; align-items: center; justify-content: flex-end; gap: 24px; padding-top: 20px; border-top: 1px solid var(--border, #e1e5e2); }
.expert-settings-card footer p { margin: 0 auto 0 0; color: var(--muted); font-size: .82rem; line-height: 1.5; }
.expert-settings-empty { color: var(--muted); line-height: 1.6; }
@media (max-width: 600px) {
  .expert-settings-card { padding: 20px; }
  .expert-photo-field { align-items: flex-start; flex-direction: column; gap: 16px; }
  .expert-settings-card footer { align-items: stretch; flex-direction: column; gap: 15px; }
  .expert-role-heading { align-items: flex-start; }
}

.expert-photo-field .expert-remove-photo { display: flex; align-items: center; gap: 8px; }
.expert-settings-page input[type="checkbox"] { width: 18px; min-height: 18px; height: 18px; padding: 0; flex-shrink: 0; }
.expert-skill-choice { font-weight: 400; }
.expert-skill-choice strong { font-weight: 600; }
.expert-settings-page .notice-success { padding: 14px 18px; border: 1px solid #bfdbce; border-radius: 10px; background: #edf6f0; color: #205e47; }
.expert-settings-page .notice-error { padding: 14px 18px; border: 1px solid #e4c3bd; border-radius: 10px; background: #fff2ef; color: #953e31; }
