/* Stemacteren HR — Claude Design source port
   Derived from Claude Design project 019ddee2-be7c-78b9-8211-9d41c0127e4f:
   tokens.css + components.css, adapted to the existing Flask/Jinja markup. */

:root {
  --ink-900: #0E1726;
  --ink-800: #1A2435;
  --ink-700: #2B3648;
  --ink-600: #4A5468;
  --ink-500: #6B7488;
  --ink-400: #939BAC;
  --ink-300: #BFC4D0;
  --ink-200: #DDE0E7;
  --ink-100: #ECEEF2;

  --surface-canvas: #F4F2EC;
  --surface-panel: #FFFFFF;
  --surface-sunken: #F8F7F2;
  --surface-inset: #EFEDE6;

  --rule-strong: #D9D6CC;
  --rule: #E5E2D8;
  --rule-soft: #ECEAE2;

  --blue-700: #1E3FA0;
  --blue-600: #2B5BD7;
  --blue-500: #4674E5;
  --blue-100: #E5EBFA;
  --blue-50: #F1F4FC;

  --yellow-600: #C49810;
  --yellow-500: #F4C430;
  --yellow-100: #FBEFC9;
  --yellow-50: #FDF7E1;

  --coral-600: #C24A37;
  --coral-500: #E5604D;
  --coral-100: #FADBD4;
  --coral-50: #FCEAE4;

  --green-700: #1F6A43;
  --green-600: #2E8B5A;
  --green-100: #D5EADD;
  --green-50: #E9F4EE;

  --font-ui: "IBM Plex Sans", "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --fs-11: 11px;
  --fs-12: 12px;
  --fs-13: 13px;
  --fs-14: 14px;
  --fs-15: 15px;
  --fs-17: 17px;
  --fs-20: 20px;
  --fs-24: 24px;
  --fs-32: 32px;
  --fs-44: 44px;

  --r-2: 2px;
  --r-4: 4px;
  --r-6: 6px;
  --r-8: 8px;
  --r-pill: 999px;

  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-16: 64px;

  --shadow-panel: 0 0 0 1px var(--rule), 0 1px 0 rgba(14, 23, 38, 0.02);
  --shadow-pop: 0 0 0 1px var(--rule-strong), 0 12px 24px -16px rgba(14, 23, 38, 0.18), 0 4px 8px -4px rgba(14, 23, 38, 0.08);

  --bg: var(--surface-canvas);
  --surface: var(--surface-panel);
  --panel: var(--surface-panel);
  --panel-strong: var(--surface-panel);
  --surface-cool: var(--blue-50);
  --ink: var(--ink-900);
  --muted: var(--ink-500);
  --soft-text: var(--ink-500);
  --line: var(--rule);
  --brand-blue: var(--blue-600);
  --brand-blue-strong: var(--blue-700);
  --brand-blue-soft: var(--blue-50);
  --brand-yellow: var(--yellow-500);
  --brand-coral: var(--coral-500);
  --brand-leaf: var(--green-600);
  --brand-red: var(--coral-600);
  --radius: var(--r-8);
  --shadow-soft: var(--shadow-panel);
  --shadow-small: none;
}

html,
body {
  min-height: 100%;
  overflow-x: hidden;
}

body {
  color: var(--ink-900);
  font-family: var(--font-ui);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  background: var(--surface-canvas);
  font-size: var(--fs-14);
  line-height: 1.45;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

button:focus-visible,
[role="button"]:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--blue-600);
  outline-offset: 2px;
}

::selection {
  background: var(--blue-100);
  color: var(--ink-900);
}

body.is-authenticated,
body.is-public {
  background: var(--surface-canvas);
}

body.is-authenticated::before,
body.is-public::before,
.noise,
.sidepanel::before {
  display: none !important;
}

/* App shell */
.sa-app.app-frame {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  grid-template-rows: 56px minmax(0, 1fr);
  gap: 0;
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
  height: 100vh;
  padding: 0;
  background: var(--surface-canvas);
}

.sa-brand.brand-card {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  overflow: hidden;
  padding: 0 var(--s-4);
  border: 0;
  border-right: 1px solid var(--ink-800);
  border-radius: 0;
  background: var(--ink-900);
  color: #fff;
  text-decoration: none;
  box-shadow: none;
}

.sa-brand__name {
  flex: 0 0 auto;
  color: #DDE6F3;
  font-size: var(--fs-13);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.08;
  white-space: nowrap;
}

.sa-brand__wordmark {
  display: inline-flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  color: #F8FAFC;
  font-size: var(--fs-15);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sa-brand__wordmark::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--yellow-500);
  box-shadow: 0 0 0 4px rgba(244, 196, 48, 0.12);
}

.sa-brand__name em {
  margin-left: 2px;
  color: #9DA9BA;
  font-style: normal;
  font-weight: 400;
}

.brand-card.public-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: var(--r-8);
  background: var(--surface-panel);
  box-shadow: var(--shadow-panel);
}

.brand-card.public-brand .sa-brand__wordmark {
  flex: 0 1 auto;
  color: var(--ink-900);
}

.brand-card.public-brand .sa-brand__name {
  color: var(--ink-600);
}

.brand-card.public-brand .sa-brand__name em {
  display: inline;
  color: var(--ink-500);
}

.sa-topbar.workspace-top {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 0 var(--s-6);
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  background: var(--surface-panel);
  box-shadow: none;
}

.sa-topbar__crumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--ink-500);
  font-size: var(--fs-13);
}

.sa-topbar__crumbs strong {
  overflow: hidden;
  color: var(--ink-900);
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sa-topbar__sep {
  color: var(--ink-300);
}

.sa-topbar__actions {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  min-width: max-content;
}

.sa-avatar {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--rule);
  border-radius: var(--r-pill);
  background: var(--ink-100);
  color: var(--ink-700);
  font-size: var(--fs-12);
  font-weight: 600;
}

.sa-side.sidepanel {
  grid-column: 1;
  grid-row: 2;
  position: relative;
  top: auto;
  height: auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: auto;
  padding: var(--s-5) 0 var(--s-4);
  border: 0;
  border-right: 1px solid var(--ink-800);
  border-radius: 0;
  background: var(--ink-900);
  color: var(--ink-300);
  box-shadow: none;
}

.actor-card {
  margin: 0 var(--s-4) var(--s-4);
  padding: var(--s-3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--r-6);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: none;
}

.actor-card span {
  color: var(--ink-500);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.actor-card strong {
  margin-top: 3px;
  color: #fff;
  font-size: var(--fs-13);
  font-weight: 600;
}

.actor-card small {
  color: var(--ink-400);
  font-family: var(--font-mono);
  font-size: var(--fs-11);
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 0 var(--s-4);
}

.nav-label {
  margin: var(--s-4) 0 var(--s-2);
  padding: 0 var(--s-3);
  color: var(--ink-500);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
  margin: 1px 0;
  padding: 7px var(--s-3);
  border-radius: var(--r-6);
  color: var(--ink-300);
  font-size: var(--fs-13);
  font-weight: 500;
  text-decoration: none;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.nav-item.active {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.nav-item.active::before {
  content: "";
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: -16px;
  width: 2px;
  border-radius: 0 2px 2px 0;
  background: var(--yellow-500);
}

.logout-form {
  margin-top: auto;
  padding: var(--s-4);
  border-top: 1px solid var(--ink-800);
}

.logout-form button {
  width: 100%;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-6);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-200);
  font-size: var(--fs-13);
  font-weight: 500;
  box-shadow: none;
}

.logout-form button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.sa-content.workspace {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overflow-x: hidden;
  padding: 0;
  background: var(--surface-canvas);
}

.sa-page.content-stack {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: var(--s-8) var(--s-8) var(--s-12);
}

.flash-list {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  gap: var(--s-2);
  max-width: none;
  margin: 0;
  padding: var(--s-3) var(--s-8) 0;
}

.flash {
  border: 1px solid var(--rule);
  border-radius: var(--r-6);
  background: var(--surface-panel);
  color: var(--ink-800);
  box-shadow: var(--shadow-panel);
}

/* Claude components */
.sa-page__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-6);
  margin-bottom: var(--s-6);
}

.sa-page__title-block {
  max-width: 720px;
}

.eyebrow,
.sa-page__eyebrow,
.sa-field__label,
.caps {
  color: var(--ink-500);
  font-size: var(--fs-11);
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sa-page__title {
  margin: 0;
  color: var(--ink-900);
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.08;
}

.sa-page__sub {
  max-width: 580px;
  margin: var(--s-2) 0 0;
  color: var(--ink-600);
  font-size: var(--fs-14);
}

.sa-panel {
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: var(--r-8);
  background: var(--surface-panel);
  box-shadow: none;
}

.sa-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding: 14px var(--s-5);
  border-bottom: 1px solid var(--rule);
}

.sa-panel__head h3 {
  margin: 0;
  color: var(--ink-900);
  font-family: var(--font-ui);
  font-size: var(--fs-14);
  font-weight: 650;
  letter-spacing: 0;
}

.sa-panel__body {
  padding: var(--s-5);
}

.sa-panel__body--flush {
  padding: 0;
}

.sa-btn,
.workspace-top .button-link,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto;
  min-width: 0;
  height: 32px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-6);
  background: var(--surface-panel);
  color: var(--ink-800);
  box-shadow: none;
  font-size: var(--fs-13);
  font-weight: 550;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.sa-btn:hover,
.workspace-top .button-link:hover,
.button-link:hover {
  border-color: var(--ink-300);
  background: var(--surface-sunken);
  color: var(--ink-900);
}

.sa-btn--primary,
.button-link.primary {
  border-color: var(--ink-900);
  background: var(--ink-900);
  color: #fff;
}

.sa-btn--primary:hover,
.button-link.primary:hover {
  border-color: var(--ink-800);
  background: var(--ink-800);
  color: #fff;
}

.sa-btn--brand {
  border-color: var(--blue-600);
  background: var(--blue-600);
  color: #fff;
}

.sa-btn--brand:hover {
  border-color: var(--blue-700);
  background: var(--blue-700);
  color: #fff;
}

.sa-btn--sm {
  height: 26px;
  min-height: 26px;
  padding: 0 8px;
  font-size: var(--fs-12);
}

.sa-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px 2px 7px;
  border: 1px solid transparent;
  border-radius: var(--r-4);
  font-size: var(--fs-12);
  font-weight: 550;
  line-height: 1.4;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}

.sa-pill__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.sa-pill--neutral {
  border-color: var(--rule);
  background: var(--surface-sunken);
  color: var(--ink-700);
}

.sa-pill--neutral .sa-pill__dot {
  background: var(--ink-400);
}

.sa-pill--planned {
  border-color: var(--blue-100);
  background: var(--blue-50);
  color: var(--blue-700);
}

.sa-pill--planned .sa-pill__dot {
  background: var(--blue-600);
}

.sa-pill--ready {
  border-color: var(--green-100);
  background: var(--green-50);
  color: var(--green-700);
}

.sa-pill--ready .sa-pill__dot {
  background: var(--green-600);
}

.sa-pill--late {
  border-color: var(--coral-100);
  background: var(--coral-50);
  color: var(--coral-600);
}

.sa-pill--late .sa-pill__dot {
  background: var(--coral-500);
}

.sa-form {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
}

.sa-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sa-input,
.sa-select,
.sa-textarea,
.people-directory-head input,
input,
select,
textarea {
  padding: 9px 12px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-6);
  background: var(--surface-panel);
  color: var(--ink-900);
  box-shadow: none;
  font-family: var(--font-ui);
  font-size: var(--fs-14);
  outline: none;
}

.sa-input:focus,
.sa-select:focus,
.sa-textarea:focus,
.people-directory-head input:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px var(--blue-50);
}

.sa-textarea,
textarea {
  min-height: 90px;
  resize: vertical;
}

.check {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 38px;
  color: var(--ink-700);
  font-size: var(--fs-13);
  font-weight: 550;
}

.check input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue-600);
}

.mono {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
}

/* Existing template compatibility layer */
.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-6);
  margin-bottom: var(--s-6);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink-900);
  box-shadow: none;
}

.hero::before,
.hero::after {
  display: none;
}

.hero h2 {
  max-width: 780px;
  margin: var(--s-1) 0 0;
  color: var(--ink-900);
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.08;
}

.hero p {
  max-width: 620px;
  margin: var(--s-3) 0 0;
  color: var(--ink-600);
  font-size: var(--fs-15);
}

.hero-actions,
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  align-items: center;
}

.panel,
.compact-card,
.feedback-card,
.feedback-form-panel,
.question-card,
.score-panel,
.happiness-group,
.module-card,
.entity-card,
.quiet-panel {
  overflow: visible;
  border: 1px solid var(--rule);
  border-radius: var(--r-8);
  background: var(--surface-panel);
  box-shadow: none;
}

.panel,
.compact-card,
.feedback-card,
.feedback-form-panel,
.question-card,
.score-panel,
.happiness-group,
.quiet-panel {
  padding: var(--s-5);
}

.section-head,
.panel-head,
.entity-head,
.happiness-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  margin-bottom: var(--s-4);
}

.section-head h3,
.panel-head h3,
.happiness-group-head h3 {
  margin: 0;
  color: var(--ink-900);
  font-family: var(--font-ui);
  font-size: var(--fs-15);
  font-weight: 650;
  letter-spacing: 0;
}

.section-head a,
.panel-head a,
.entity-head a,
.action-list a,
.timeline a,
.ghost-link {
  color: var(--blue-600);
  font-size: var(--fs-13);
  font-weight: 650;
  text-decoration: none;
}

.section-head a:hover,
.panel-head a:hover,
.entity-head a:hover,
.action-list a:hover,
.timeline a:hover,
.ghost-link:hover {
  color: var(--blue-700);
  text-decoration: underline;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0;
  overflow: hidden;
  margin-bottom: var(--s-6);
  border: 1px solid var(--rule);
  border-radius: var(--r-8);
  background: var(--surface-panel);
}

.metric-grid.three {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.metric-grid article {
  min-width: 0;
  padding: var(--s-5);
  border-top: 0;
  border-left: 0;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.metric-grid article:nth-child(4n),
.metric-grid.three article:nth-child(3n) {
  border-right: 0;
}

.metric-grid h3 {
  margin: 0;
  color: var(--ink-900);
  font-family: var(--font-ui);
  font-size: var(--fs-24);
  font-weight: 650;
  letter-spacing: 0;
}

.metric-grid p {
  margin: var(--s-1) 0 0;
  color: var(--ink-500);
  font-size: var(--fs-13);
  font-weight: 550;
}

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-5);
  align-items: start;
  margin-bottom: var(--s-6);
}

.split.single-mobile {
  grid-template-columns: minmax(360px, 0.9fr) minmax(0, 1.1fr);
}

.module-grid,
.entity-grid,
.feedback-duo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--s-3);
}

.module-card,
.entity-card {
  display: grid;
  gap: var(--s-2);
  min-height: 110px;
  padding: var(--s-4);
  color: inherit;
  text-decoration: none;
  transition: background 0.08s ease, border-color 0.08s ease;
}

.module-card:hover,
.entity-card:hover {
  border-color: var(--ink-300);
  background: var(--surface-sunken);
}

.module-card strong,
.entity-head a {
  color: var(--ink-900);
  font-size: var(--fs-15);
  font-weight: 650;
}

.module-card p,
.entity-meta,
.compact-list,
.status-line,
.action-list small,
.timeline small {
  color: var(--ink-500);
  font-size: var(--fs-13);
}

.readiness-grid {
  display: grid;
  gap: var(--s-3);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.readiness-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-3);
  border: 1px solid var(--rule);
  border-radius: var(--r-4);
  background: var(--surface-sunken);
}

.readiness-item.is-ready {
  border-color: var(--green-100);
  background: var(--green-50);
}

.readiness-item.needs-work {
  border-color: #F1E2A8;
  background: var(--yellow-50);
}

.readiness-item strong,
.readiness-item p {
  margin: 0;
}

.readiness-item p,
.readiness-item small,
.demo-login-switch p {
  color: var(--ink-500);
}

.demo-login-switch {
  padding: var(--s-3);
  border: 1px dashed var(--rule);
  border-radius: var(--r-4);
  background: var(--surface-sunken);
}

.entity-meta,
.status-line {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-4);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-4);
}

.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-grid label > span,
.score-label {
  color: var(--ink-500);
  font-size: var(--fs-11);
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.form-grid .full,
.form-grid button {
  grid-column: 1 / -1;
}

.form-grid button,
.row-actions button,
button[type="submit"] {
  width: auto;
  justify-self: start;
  min-height: 32px;
  border-radius: var(--r-6);
  box-shadow: none;
}

.form-grid button:not(.danger),
.row-actions button:not(.danger),
button[type="submit"]:not(.danger) {
  border: 1px solid var(--blue-600);
  background: var(--blue-600);
  color: #fff;
}

.form-grid button:not(.danger):hover,
.row-actions button:not(.danger):hover,
button[type="submit"]:not(.danger):hover {
  border-color: var(--blue-700);
  background: var(--blue-700);
}

.happiness-scale-legend--section {
  gap: 6px;
  margin: 0 0 var(--s-4);
  padding: var(--s-3);
  border: 1px solid var(--rule);
  border-radius: var(--r-8);
  background: var(--surface-sunken);
}

.happiness-scale-legend--section span {
  border-color: #CDE2F5;
  background: var(--surface-panel);
  color: #244A63;
  font-size: var(--fs-12);
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
}

.score-scale {
  gap: 6px;
}

.score-choice span {
  min-width: 36px;
  height: 32px;
  border-color: var(--rule-strong);
  border-radius: var(--r-6);
  background: var(--surface-panel);
  color: var(--ink-700);
  box-shadow: none;
  font-size: var(--fs-13);
}

.score-choice.clear span,
.score-scale-happiness .score-choice span {
  min-width: 36px;
}

.score-scale-happiness .score-choice span {
  width: auto;
  min-height: 32px;
  height: auto;
  padding: 0 10px;
  font-weight: 650;
  white-space: nowrap;
}

.score-pill.frequency-pill {
  min-width: 0;
  border-radius: var(--r-pill);
  font-weight: 650;
}

button.danger,
.danger {
  border-color: var(--coral-100);
  background: var(--coral-50);
  color: var(--coral-600);
}

button.danger:hover,
.danger:hover {
  border-color: var(--coral-500);
  background: var(--coral-100);
  color: var(--coral-600);
}

button:disabled,
button[disabled] {
  cursor: not-allowed;
  border-color: var(--rule) !important;
  background: var(--surface-inset) !important;
  color: var(--ink-400) !important;
}

.logout-form button[type="submit"] {
  width: 100%;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-200);
}

.logout-form button[type="submit"]:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.flow-strip {
  margin-bottom: var(--s-6);
}

.flow-strip.panel .flow-steps {
  border: 0;
}

.flow-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: var(--r-8);
  background: var(--surface-panel);
}

.flow-steps article {
  display: grid;
  gap: var(--s-1);
  min-width: 0;
  padding: var(--s-4);
  border-right: 1px solid var(--rule);
  background: transparent;
}

.flow-steps article:last-child {
  border-right: 0;
}

.flow-steps strong {
  color: var(--ink-900);
  font-size: var(--fs-24);
  font-weight: 650;
}

.flow-steps span {
  color: var(--ink-500);
  font-size: var(--fs-12);
  font-weight: 650;
}

.timeline,
.action-list,
.invite-list,
.feedback-list,
.question-stack {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline > li,
.action-list > li,
.invite-list > li,
.feedback-list > li,
.question-stack > li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--s-4);
  align-items: start;
  padding: var(--s-4) 0;
  border-top: 1px solid var(--rule);
}

.timeline > li:first-child,
.action-list > li:first-child,
.invite-list > li:first-child,
.feedback-list > li:first-child,
.question-stack > li:first-child {
  border-top: 0;
}

.timeline p,
.action-list p {
  margin: 0;
  color: var(--ink-900);
  font-weight: 600;
}

.status,
.badge,
.chip,
.score-pill,
.delta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  padding: 2px 8px;
  border: 1px solid var(--rule);
  border-radius: var(--r-4);
  background: var(--surface-sunken);
  color: var(--ink-700);
  font-size: var(--fs-12);
  font-weight: 650;
  line-height: 1.45;
  overflow: visible;
  text-overflow: clip;
}

.status.planned,
.status.open,
.badge.risk,
.chip.primary {
  border-color: var(--blue-100);
  background: var(--blue-50);
  color: var(--blue-700);
}

.status.invited,
.status.prepared,
.status.queued,
.status.sent {
  border-color: #F1E2A8;
  background: var(--yellow-50);
  color: #8A6A0E;
}

.status.completed,
.status.done,
.status.submitted,
.up {
  border-color: var(--green-100);
  background: var(--green-50);
  color: var(--green-700);
}

.status.canceled,
.down,
.risk {
  border-color: var(--coral-100);
  background: var(--coral-50);
  color: var(--coral-600);
}

.dot {
  width: 9px;
  height: 9px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--blue-600);
}

.dot.late,
.dot.risk {
  background: var(--coral-500);
}

.dot.due,
.dot.waiting {
  background: var(--yellow-500);
}

.dot.done {
  background: var(--green-600);
}

/* People page */
.people-command {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-6);
  margin-bottom: var(--s-6);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink-900);
  box-shadow: none;
}

.people-command::before,
.people-command::after {
  display: none;
}

.people-command-copy h2,
.people-command-copy p,
.people-command-copy .eyebrow {
  color: inherit;
}

.people-command-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(82px, 1fr));
  min-width: 420px;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: var(--r-8);
  background: var(--surface-panel);
  box-shadow: none;
}

.people-command-stats article {
  display: grid;
  gap: 1px;
  min-width: 0;
  padding: 12px 14px;
  border-right: 1px solid var(--rule);
}

.people-command-stats article:last-child {
  border-right: 0;
}

.people-command-stats strong {
  color: var(--ink-900);
  font-family: var(--font-ui);
  font-size: var(--fs-20);
  font-weight: 650;
  letter-spacing: 0;
}

.people-command-stats span {
  color: var(--ink-500);
  font-size: var(--fs-12);
  font-weight: 550;
}

.people-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-5);
}

.people-directory {
  min-width: 0;
}

.people-directory-head {
  align-items: center;
}

.people-directory-head input {
  width: min(320px, 42vw);
  height: 34px;
  background: var(--surface-sunken);
  font-size: var(--fs-13);
}

.people-list {
  display: block;
}

.people-card {
  display: block;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.people-card + .people-card {
  border-top: 0;
}

.people-card[open] {
  background: var(--surface-sunken);
}

.sa-dossier.person-summary {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(150px, 1.25fr) minmax(120px, 0.7fr) minmax(72px, 0.35fr) minmax(78px, 0.35fr) auto;
  align-items: center;
  gap: var(--s-4);
  min-height: 74px;
  padding: 16px var(--s-5);
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  background: var(--surface-panel);
  color: var(--ink-900);
  list-style: none;
  cursor: pointer;
  transition: background 0.08s ease;
}

.sa-dossier.person-summary::-webkit-details-marker {
  display: none;
}

.sa-dossier.person-summary:hover {
  background: var(--surface-sunken);
}

.people-card[open] .sa-dossier.person-summary {
  background: var(--blue-50);
}

.people-card[open] .sa-dossier.person-summary::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: var(--blue-600);
}

.sa-dossier__avatar.person-avatar {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--r-pill);
  background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
  color: #fff;
  font-family: var(--font-ui);
  font-size: var(--fs-13);
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.sa-dossier__name {
  display: block;
  color: var(--ink-900);
  font-size: var(--fs-14);
  font-weight: 650;
  letter-spacing: 0;
}

.sa-dossier__sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin-top: 2px;
  color: var(--ink-500);
  font-size: var(--fs-12);
}

.sa-dossier__field-label {
  display: block;
  margin-bottom: 4px;
  color: var(--ink-400);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sa-dossier__field-value {
  display: block;
  overflow: hidden;
  color: var(--ink-800);
  font-size: var(--fs-13);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-state {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--s-2);
  justify-self: end;
}

.person-edit-form {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  padding: var(--s-5) var(--s-5) var(--s-6) 80px;
  border-bottom: 1px solid var(--rule);
  background: var(--surface-sunken);
}

.person-edit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
}

.person-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--s-4);
}

.person-form-grid .full,
.people-create-form .full {
  grid-column: 1 / -1;
}

.person-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}

.person-actions button {
  width: auto;
}

.people-danger {
  border-color: var(--coral-100);
  background: var(--coral-50);
  color: var(--coral-600);
}

.people-danger:hover {
  border-color: var(--coral-500);
  background: var(--coral-100);
  color: var(--coral-600);
}

.people-studio {
  display: grid;
  gap: var(--s-5);
}

.people-create-panel {
  background: var(--surface-panel);
}

.people-create-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-4);
}

.people-create-form button {
  grid-column: 1 / -1;
  justify-self: start;
}

.people-import-panel {
  padding: 0;
  background: var(--surface-panel);
}

.people-import-panel summary {
  display: grid;
  gap: 2px;
  padding: 14px var(--s-5);
  cursor: pointer;
  list-style: none;
}

.people-import-panel summary::-webkit-details-marker {
  display: none;
}

.people-import-panel summary strong {
  color: var(--ink-900);
  font-family: var(--font-ui);
  font-size: var(--fs-14);
  font-weight: 650;
}

.people-import-panel .facts {
  margin: 0;
  padding: var(--s-5);
  border-top: 1px solid var(--rule);
}

.facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: var(--s-2) var(--s-4);
}

.facts dt {
  color: var(--ink-500);
  font-size: var(--fs-12);
  font-weight: 650;
}

.facts dd {
  margin: 0;
  color: var(--ink-800);
  font-size: var(--fs-12);
}

.import-form {
  padding: 0 var(--s-5) var(--s-5);
}

.scale-note {
  margin: 0;
  padding: var(--s-5);
  color: var(--ink-500);
}

/* Employee dossier */
.employee-profile-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
  align-items: stretch;
  margin-bottom: var(--s-5);
  padding: var(--s-5);
  border: 1px solid var(--rule);
  border-radius: var(--r-8);
  background: var(--surface-panel);
}

.employee-profile-head {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  min-width: 0;
  padding-right: 0;
  padding-bottom: var(--s-4);
  border-right: 0;
  border-bottom: 1px solid var(--rule);
}

.employee-profile-avatar {
  width: 52px;
  height: 52px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: var(--r-pill);
  background: var(--ink-900);
  color: #fff;
  font-size: var(--fs-15);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.employee-profile-head h3 {
  margin: 1px 0 0;
  color: var(--ink-900);
  font-size: var(--fs-20);
  line-height: 1.12;
}

.employee-profile-head p {
  margin: 4px 0 0;
  color: var(--ink-500);
  font-size: var(--fs-13);
}

.employee-profile-facts {
  display: grid;
  grid-template-columns: minmax(210px, 1.3fr) minmax(150px, 0.9fr) minmax(170px, 1fr) minmax(120px, max-content);
  gap: 0;
  margin: 0;
  overflow: visible;
  border: 1px solid var(--rule);
  border-radius: var(--r-6);
  background: var(--surface-sunken);
}

.employee-profile-facts > div {
  min-width: 0;
  padding: var(--s-4);
  border-right: 1px solid var(--rule);
}

.employee-profile-facts > div:last-child {
  border-right: 0;
  min-width: max-content;
}

.employee-profile-facts dt {
  margin: 0 0 5px;
  color: var(--ink-500);
  font-size: var(--fs-11);
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.employee-profile-facts dd {
  margin: 0;
  overflow: visible;
  color: var(--ink-900);
  font-size: var(--fs-13);
  font-weight: 600;
  text-overflow: clip;
  overflow-wrap: break-word;
  word-break: normal;
}

.employee-profile-facts > div:last-child dd {
  overflow: visible;
}

.employee-timeline-section {
  margin-top: var(--s-6);
}

.employee-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-4);
  margin-bottom: var(--s-4);
}

.employee-section-head h3 {
  margin: 1px 0 0;
  color: var(--ink-900);
  font-size: var(--fs-20);
  line-height: 1.12;
}

.employee-section-note {
  color: var(--ink-500);
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  font-weight: 700;
  text-transform: uppercase;
}

.employee-timeline {
  position: relative;
  display: grid;
  gap: var(--s-3);
  margin: 0;
  padding: 0 0 0 102px;
  list-style: none;
}

.employee-timeline::before {
  content: "";
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 75px;
  width: 1px;
  background: var(--rule-strong);
}

.employee-timeline-item {
  position: relative;
  min-width: 0;
}

.employee-timeline-item::before {
  content: "";
  position: absolute;
  top: 28px;
  left: -31px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--surface-canvas);
  border-radius: var(--r-pill);
  background: var(--blue-600);
  box-shadow: 0 0 0 1px var(--blue-600);
}

.employee-timeline-item.done::before {
  background: var(--green-600);
  box-shadow: 0 0 0 1px var(--green-600);
}

.employee-timeline-item.canceled::before {
  background: var(--coral-500);
  box-shadow: 0 0 0 1px var(--coral-500);
}

.employee-review-card {
  position: relative;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: var(--s-4);
  align-items: stretch;
  min-height: 100px;
  padding: var(--s-4);
  border: 1px solid var(--rule);
  border-radius: var(--r-8);
  background: var(--surface-panel);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.08s ease, background 0.08s ease, transform 0.08s ease;
}

.employee-review-card:hover {
  border-color: var(--ink-300);
  background: var(--surface-sunken);
  transform: translateX(2px);
}

.employee-review-date {
  display: grid;
  align-content: center;
  justify-items: center;
  border-right: 1px solid var(--rule);
  color: var(--ink-500);
}

.employee-review-date span {
  color: var(--ink-900);
  font-size: 30px;
  font-weight: 650;
  line-height: 1;
}

.employee-review-date small {
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: var(--fs-11);
  font-weight: 700;
  text-transform: uppercase;
}

.employee-review-main {
  min-width: 0;
  display: grid;
  gap: var(--s-3);
}

.employee-review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
}

.employee-review-head .status {
  min-width: 112px;
  height: 30px;
  justify-content: center;
  padding: 0 11px;
  border-radius: var(--r-pill);
  font-family: var(--font-ui);
  font-size: var(--fs-12);
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1;
  text-transform: none;
  white-space: nowrap;
}

.employee-review-head .status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: var(--r-pill);
  background: currentColor;
  opacity: 0.88;
}

.employee-review-head .status.done,
.employee-review-head .status.completed {
  border-color: var(--green-100);
  background: var(--green-50);
  color: var(--green-700);
}

.employee-review-head .status.canceled {
  border-color: var(--coral-100);
  background: var(--coral-50);
  color: var(--coral-600);
}

.employee-review-head .status.plan,
.employee-review-head .status.planned {
  border-color: var(--blue-100);
  background: var(--blue-50);
  color: var(--blue-700);
}

.employee-review-head h4 {
  margin: 0;
  color: var(--ink-900);
  font-size: var(--fs-17);
  font-weight: 650;
  line-height: 1.16;
}

.employee-review-main p {
  margin: 0;
  color: var(--ink-500);
  font-size: var(--fs-13);
}

.employee-review-main p span {
  color: var(--ink-600);
}

.employee-review-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}

.employee-review-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid var(--rule);
  border-radius: var(--r-4);
  background: var(--surface-sunken);
  color: var(--ink-700);
  font-size: var(--fs-12);
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: normal;
}

.employee-review-meta strong {
  color: var(--ink-500);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 1180px) {
  .employee-profile-panel {
    grid-template-columns: 1fr;
  }

  .employee-profile-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .employee-profile-head {
    padding-right: 0;
    padding-bottom: var(--s-4);
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }
}

@media (max-width: 760px) {
  .employee-profile-panel,
  .employee-profile-facts {
    grid-template-columns: 1fr;
  }

  .employee-profile-facts > div {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }

  .employee-profile-facts > div:last-child {
    border-bottom: 0;
  }

  .employee-timeline {
    padding-left: 0;
  }

  .employee-timeline::before,
  .employee-timeline-item::before {
    display: none;
  }

  .employee-review-card {
    grid-template-columns: 1fr;
  }

  .employee-review-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .employee-review-head .status {
    min-width: 0;
  }

  .employee-review-date {
    grid-auto-flow: column;
    justify-content: start;
    gap: var(--s-2);
    border-right: 0;
    border-bottom: 1px solid var(--rule);
    padding-bottom: var(--s-3);
  }
}

@media (min-width: 1320px) {
  .people-workbench {
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: start;
  }

  .people-studio {
    position: sticky;
    top: var(--s-5);
  }
}

@media (max-width: 1100px) {
  .sa-dossier.person-summary {
    grid-template-columns: 44px minmax(180px, 1fr) minmax(110px, 0.5fr) auto;
  }

  .sa-dossier.person-summary > span:nth-child(4),
  .sa-dossier.person-summary > span:nth-child(5) {
    display: none;
  }
}

@media (max-width: 1180px) {
  .people-command {
    align-items: stretch;
    flex-direction: column;
  }

  .people-command-stats {
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 860px) {
  .sa-app.app-frame {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto minmax(0, 1fr);
    height: auto;
    min-height: 100vh;
  }

  .sa-brand.brand-card,
  .sa-topbar.workspace-top,
  .sa-side.sidepanel,
  .sa-content.workspace {
    grid-column: 1;
  }

  .sa-brand.brand-card {
    grid-row: 1;
    min-height: 56px;
  }

  .sa-topbar.workspace-top {
    grid-row: 2;
    gap: var(--s-3);
    padding: var(--s-3) var(--s-4);
    flex-wrap: wrap;
  }

  .sa-side.sidepanel {
    grid-row: 3;
    min-height: auto;
    padding: var(--s-3) var(--s-4);
    border-right: 0;
  }

  .side-nav {
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0;
  }

  .nav-label,
  .actor-card {
    display: none;
  }

  .logout-form {
    width: 100%;
    margin-top: var(--s-2);
    padding: var(--s-2) 0 0;
  }

  .nav-item.active::before {
    display: none;
  }

  .sa-content.workspace {
    grid-row: 4;
    max-width: 100%;
    overflow-x: clip;
    overflow-y: visible;
  }

  .sa-page.content-stack {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    padding: var(--s-6) var(--s-4) var(--s-10);
  }

  .people-directory-head {
    align-items: stretch;
    flex-direction: column;
  }

  .people-directory-head input {
    width: 100%;
  }
}

@media (max-width: 700px) {
  .sa-page__title {
    font-size: 28px;
  }

  .sa-dossier.person-summary {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: var(--s-3);
  }

  .sa-dossier.person-summary > span:nth-child(3),
  .sa-dossier.person-summary > span:nth-child(4),
  .sa-dossier.person-summary > span:nth-child(5) {
    display: none;
  }

  .person-edit-form {
    padding: var(--s-5);
  }

  .people-create-form,
  .people-command-stats {
    grid-template-columns: 1fr;
  }

  .people-command-stats article {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }

  .people-command-stats article:last-child {
    border-bottom: 0;
  }
}

/* Readability + responsive safety pass
   Keep labels visible, prefer wrapping/scrolling over clipped words. */
.sa-brand.brand-card {
  gap: 14px;
  overflow: hidden;
  padding: 0 var(--s-4);
}

.sa-brand__name {
  flex: 0 0 auto;
  min-width: 0;
  line-height: 1.05;
  white-space: normal;
}

.sa-brand__name em {
  display: block;
  margin-left: 0;
}

.sa-topbar__crumbs {
  flex-wrap: wrap;
  row-gap: 2px;
}

.sa-topbar__crumbs strong {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.sa-topbar__actions {
  min-width: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.sa-btn,
.workspace-top .button-link,
.button-link {
  height: auto;
  min-height: 34px;
  max-width: 100%;
  line-height: 1.18;
  text-align: center;
  white-space: normal;
}

button,
input,
select,
textarea {
  max-width: 100%;
}

.status,
.badge,
.chip,
.score-pill,
.delta-pill,
.sa-pill {
  width: auto;
  max-width: 100%;
  overflow: visible;
  letter-spacing: 0;
  text-overflow: clip;
  text-transform: none;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
}

.sa-pill__dot,
.employee-review-head .status::before {
  flex: 0 0 auto;
}

.panel,
.compact-card,
.feedback-card,
.feedback-form-panel,
.question-card,
.score-panel,
.happiness-group,
.module-card,
.entity-card,
.quiet-panel {
  min-width: 0;
}

.entity-card,
.module-card {
  overflow: visible;
}

.module-grid,
.entity-grid,
.feedback-duo {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.entity-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}

.section-head,
.panel-head,
.entity-head,
.happiness-group-head {
  flex-wrap: wrap;
}

.entity-head {
  align-items: flex-start;
}

.entity-head > a,
.entity-head > strong,
.entity-role,
.entity-meta span,
.entity-metrics span,
.action-list small,
.timeline small,
.status-line span,
.module-card p,
.feedback-card p,
.compact-list li {
  max-width: 100%;
  overflow-wrap: break-word;
  white-space: normal;
}

.sa-dossier__field-value {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: break-word;
}

.plan-competencies {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.plan-competencies .chip {
  margin: 0;
}

table {
  width: 100%;
}

th,
td {
  overflow-wrap: break-word;
  word-break: normal;
  white-space: normal;
}

td a,
td code,
td .mono {
  overflow-wrap: anywhere;
}

.score-table {
  table-layout: auto;
}

@media (max-width: 1020px) {
  .split,
  .split.single-mobile {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) {
  table,
  .score-table {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table thead,
  table tbody {
    display: table;
    width: 100%;
    min-width: 680px;
  }

  .score-table thead,
  .score-table tbody {
    min-width: 760px;
  }
}

@media (max-width: 860px) {
  .sa-brand.brand-card {
    justify-content: space-between;
  }

  .sa-topbar__actions {
    width: auto;
    flex: 0 1 auto;
    justify-content: flex-start;
  }

  .side-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
    gap: var(--s-2);
  }

  .nav-item {
    justify-content: center;
    min-height: 38px;
    text-align: center;
    white-space: normal;
  }
}

@media (max-width: 760px) {
  .sa-topbar.workspace-top {
    align-items: center;
    flex-direction: row;
  }

  .sa-topbar__crumbs {
    flex: 1 1 auto;
  }

  .timeline > li,
  .action-list > li,
  .invite-list > li,
  .feedback-list > li {
    grid-template-columns: 1fr;
    gap: var(--s-2);
  }

  .timeline > li .row-actions {
    justify-content: flex-start;
  }

  .hero {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .sa-page.content-stack {
    padding: var(--s-5) var(--s-3) var(--s-8);
  }

  .hero h2,
  .sa-page__title {
    font-size: 26px;
    line-height: 1.1;
  }

  .metric-grid,
  .metric-grid.three,
  .flow-steps {
    grid-template-columns: 1fr;
  }

  .metric-grid article,
  .flow-steps article,
  .people-command-stats article {
    border-right: 0;
  }

  .employee-review-head .status {
    min-width: 0;
    justify-content: flex-start;
  }
}

/* Admin forms without database-ish ID fields */
.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--s-2);
  width: 100%;
}

.choice-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.choice-grid.tall {
  max-height: 360px;
  overflow: auto;
  padding: var(--s-2);
  border: 1px solid var(--rule);
  border-radius: var(--r-8);
  background: var(--surface-sunken);
}

.choice-tile {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--s-2);
  align-items: start;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid var(--rule);
  border-radius: var(--r-6);
  background: var(--surface-panel);
  color: var(--ink-800);
  cursor: pointer;
}

.form-grid .choice-tile {
  flex-direction: initial;
}

.choice-tile:hover {
  border-color: var(--ink-300);
  background: var(--blue-50);
}

.choice-tile input {
  margin-top: 2px;
}

.choice-tile span,
.choice-tile strong,
.choice-tile small {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.form-grid .choice-tile > span {
  color: var(--ink-800);
  font-size: var(--fs-13);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.choice-tile strong {
  display: block;
  color: var(--ink-900);
  font-size: var(--fs-13);
}

.choice-tile small {
  display: block;
  margin-top: 2px;
  color: var(--ink-500);
  font-size: var(--fs-12);
  line-height: 1.35;
}

.catalog-list,
.question-bank {
  display: grid;
  gap: var(--s-3);
}

.catalog-card,
.catalog-row,
.question-bank article {
  min-width: 0;
  padding: var(--s-4);
  border: 1px solid var(--rule);
  border-radius: var(--r-8);
  background: var(--surface-sunken);
}

.catalog-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) minmax(0, 1.15fr);
  gap: var(--s-5);
  align-items: start;
}

.catalog-card h4,
.catalog-row h4 {
  margin: 2px 0 var(--s-2);
  color: var(--ink-900);
  font-size: var(--fs-17);
  line-height: 1.18;
}

.catalog-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: var(--s-3);
  align-items: center;
}

.catalog-row p,
.question-bank p {
  margin: 0;
  color: var(--ink-600);
  font-size: var(--fs-13);
}

.catalog-card__form {
  display: grid;
  gap: var(--s-3);
  min-width: 0;
}

.form-caption {
  color: var(--ink-500);
  font-size: var(--fs-11);
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chip-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.question-bank article {
  display: grid;
  gap: var(--s-1);
}

.question-bank small {
  color: var(--ink-500);
  font-size: var(--fs-12);
  font-weight: 650;
}

@media (max-width: 760px) {
  .catalog-card,
  .catalog-row {
    grid-template-columns: 1fr;
  }

  .choice-grid,
  .choice-grid.compact {
    grid-template-columns: 1fr;
  }

  .score-scale {
    gap: var(--s-2);
  }

  .score-choice span {
    min-width: 40px;
    min-height: 40px;
    height: auto;
  }

  .score-scale-happiness .score-choice span {
    min-height: 40px;
    white-space: normal;
  }

  .score-table {
    display: block;
    overflow: visible;
  }

  .score-table thead {
    display: none;
  }

  .score-table tbody {
    display: grid;
    width: 100%;
    min-width: 0;
    gap: var(--s-3);
  }

  .score-table tr {
    display: grid;
    gap: var(--s-2);
    padding: var(--s-4);
    border: 1px solid var(--rule);
    border-radius: var(--r-8);
    background: var(--surface-sunken);
  }

  .score-table td {
    display: grid;
    grid-template-columns: minmax(96px, 0.35fr) minmax(0, 1fr);
    gap: var(--s-3);
    align-items: start;
    padding: 0;
    border: 0;
  }

  .score-table td::before {
    content: attr(data-label);
    color: var(--ink-500);
    font-size: var(--fs-11);
    font-weight: 650;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
}

/* Phase 3 interface polish:
   fewer database cues, calmer prep surfaces, and stronger wrapping guarantees. */
.entity-link,
.invite-link a,
.invite-link button,
.prep-actions .ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-6);
  background: var(--surface-panel);
  color: var(--ink-800);
  font-size: var(--fs-13);
  font-weight: 600;
  line-height: 1.15;
  text-decoration: none;
  white-space: normal;
}

.entity-link:hover,
.invite-link a:hover,
.invite-link button:hover,
.prep-actions .ghost-link:hover {
  border-color: var(--ink-300);
  background: var(--surface-sunken);
  color: var(--ink-900);
  text-decoration: none;
}

.sa-content.workspace {
  overflow-x: auto;
}

.timeline > li,
.action-list > li,
.invite-list > li,
.feedback-list > li,
.question-stack > li {
  border: 0;
  border-top: 1px solid var(--rule);
  border-radius: 0;
  background: transparent;
}

.timeline > li:first-child,
.action-list > li:first-child,
.invite-list > li:first-child,
.feedback-list > li:first-child,
.question-stack > li:first-child {
  border-top: 0;
}

.timeline > li .row-actions {
  grid-column: auto;
}

.timeline > li .row-actions form {
  min-width: 0;
}

.status,
.badge,
.sa-pill {
  width: fit-content;
  min-width: max-content;
  white-space: nowrap;
}

.chip,
.score-pill,
.delta-pill {
  overflow-wrap: break-word;
  white-space: normal;
}

.entity-card {
  align-content: space-between;
  gap: var(--s-4);
}

.entity-role,
.entity-metrics {
  max-width: 100%;
}

.entity-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}

.entity-metrics span {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 100%;
}

.prep-flow {
  display: grid;
  gap: var(--s-5);
}

.plan-progress {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin: var(--s-3) 0 0;
  padding: 0;
  list-style: none;
}

.plan-progress li {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 var(--s-2);
  border: 1px solid var(--rule);
  border-radius: var(--r-6);
  background: var(--surface-sunken);
  color: var(--ink-500);
  font-size: var(--fs-12);
  font-weight: 650;
}

.plan-progress li.is-done {
  border-color: color-mix(in srgb, var(--accent-green) 35%, var(--rule));
  background: color-mix(in srgb, var(--accent-green) 10%, var(--surface-panel));
  color: var(--ink-800);
}

.outcome-panel {
  display: grid;
  gap: var(--s-4);
}

.outcome-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.8fr;
  gap: var(--s-3);
}

.outcome-grid article {
  min-width: 0;
  padding: var(--s-4);
  border: 1px solid var(--rule);
  border-radius: var(--r-8);
  background: var(--surface-sunken);
}

.outcome-grid span {
  display: block;
  margin-bottom: var(--s-2);
  color: var(--ink-500);
  font-size: var(--fs-12);
  font-weight: 700;
  text-transform: uppercase;
}

.outcome-grid p,
.outcome-grid ol {
  margin: 0;
}

.outcome-grid ol {
  padding-left: 1.2rem;
}

.agreement-workspace {
  display: grid;
  gap: var(--s-4);
}

.agreement-list {
  display: grid;
  gap: var(--s-3);
}

.agreement-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s-4);
  align-items: center;
  padding: var(--s-4);
  border: 1px solid var(--rule);
  border-radius: var(--r-8);
  background: var(--surface-sunken);
}

.agreement-card.done {
  border-color: color-mix(in srgb, var(--accent-green) 28%, var(--rule));
  background: color-mix(in srgb, var(--accent-green) 8%, var(--surface-sunken));
}

.agreement-card h4 {
  margin: var(--s-2) 0 0;
  color: var(--ink-900);
  font-size: var(--fs-15);
}

.agreement-card p {
  margin: var(--s-1) 0 0;
  color: var(--ink-500);
  font-size: var(--fs-13);
}

.agreement-card form {
  margin: 0;
}

.agreement-form {
  padding-top: var(--s-4);
  border-top: 1px solid var(--rule);
}

.form-label,
.agreement-editor-row label > span {
  color: var(--ink-500);
  font-size: var(--fs-11);
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.agreement-editor {
  display: grid;
  gap: var(--s-3);
}

.agreement-editor-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(140px, 0.8fr) minmax(120px, 0.7fr) minmax(130px, 0.7fr);
  gap: var(--s-3);
  padding: var(--s-3);
  border: 1px solid var(--rule);
  border-radius: var(--r-8);
  background: var(--surface-panel);
}

.agreement-mini-list {
  display: grid;
  gap: var(--s-2);
}

.agreement-mini {
  display: grid;
  gap: 3px;
  padding: var(--s-3);
  border: 1px solid var(--rule);
  border-radius: var(--r-8);
  background: var(--surface-panel);
}

.agreement-mini.done {
  border-color: color-mix(in srgb, var(--accent-green) 28%, var(--rule));
}

.agreement-mini strong {
  color: var(--ink-900);
  font-size: var(--fs-13);
}

.agreement-mini small {
  color: var(--ink-500);
  font-size: var(--fs-12);
}

.agreement-import-list {
  display: grid;
  gap: var(--s-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.agreement-import-list > li {
  display: grid;
  gap: var(--s-2);
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--rule);
}

.agreement-import-list > li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.agreement-import-list ul {
  display: grid;
  gap: var(--s-1);
  margin: 0;
  padding-left: 1.1rem;
  color: var(--ink-700);
}

.prep-flow.is-locked input:not([type="hidden"]),
.prep-flow.is-locked textarea,
.prep-flow.is-locked select {
  pointer-events: none;
  background: var(--surface-inset);
  color: var(--ink-500);
}

.prep-overview {
  display: grid;
  gap: var(--s-4);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(248, 247, 242, 0.92)),
    var(--surface-panel);
}

.prep-headline p {
  max-width: 720px;
  margin: 0;
  color: var(--ink-700);
  font-size: var(--fs-15);
}

.prep-meter {
  display: grid;
  gap: var(--s-2);
}

.prep-meter-track {
  height: 8px;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: var(--r-pill);
  background: var(--surface-inset);
}

.prep-meter-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue-600), var(--green-600));
  transition: width 0.18s ease;
}

.prep-meter span {
  color: var(--ink-600);
  font-size: var(--fs-12);
  font-weight: 650;
}

.prep-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: var(--r-8);
  background: var(--surface-panel);
}

.prep-stat {
  min-width: 0;
  padding: var(--s-4);
  border-right: 1px solid var(--rule);
  background: transparent;
}

.prep-stat:last-child {
  border-right: 0;
}

.prep-stat strong {
  display: block;
  color: var(--ink-900);
  font-size: var(--fs-20);
  font-weight: 650;
  line-height: 1.1;
}

.prep-stat span {
  display: block;
  margin-top: 3px;
  color: var(--ink-500);
  font-size: var(--fs-12);
  font-weight: 550;
}

.prep-jump {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}

.prep-jump a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--rule);
  border-radius: var(--r-pill);
  background: var(--surface-sunken);
  color: var(--ink-700);
  font-size: var(--fs-12);
  font-weight: 650;
  text-decoration: none;
}

.prep-jump a:hover {
  border-color: var(--ink-300);
  background: var(--surface-panel);
  color: var(--ink-900);
  text-decoration: none;
}

.question-stack {
  display: grid;
  gap: var(--s-3);
}

.question-card,
.happiness-group,
.optional-block {
  border-color: var(--rule);
  border-radius: var(--r-8);
  background: var(--surface-sunken);
  box-shadow: none;
}

.question-card {
  display: grid;
  gap: var(--s-3);
  padding: var(--s-4);
}

.question-card header,
.happiness-group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-2);
}

.question-card h4,
.happiness-group h4,
.optional-body h4 {
  margin: 0;
  color: var(--ink-900);
  font-family: var(--font-ui);
  font-size: var(--fs-15);
  font-weight: 650;
  line-height: 1.25;
}

.question-text p {
  margin: 0;
  color: var(--ink-800);
}

.score-scale {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}

.score-choice {
  position: relative;
  display: inline-flex;
  max-width: 100%;
}

.score-choice input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.score-choice span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 34px;
  height: auto;
  padding: 0 10px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-6);
  background: var(--surface-panel);
  color: var(--ink-700);
  box-shadow: none;
  font-size: var(--fs-13);
  font-weight: 650;
  line-height: 1.15;
  white-space: normal;
  transition: border-color 0.1s ease, background 0.1s ease, transform 0.1s ease;
}

.score-choice input:hover + span {
  border-color: var(--ink-300);
  background: var(--surface-panel);
  transform: translateY(-1px);
}

.score-choice input:checked + span {
  border-color: var(--blue-600);
  background: var(--blue-50);
  color: var(--blue-700);
  box-shadow: 0 0 0 2px rgba(43, 91, 215, 0.1);
}

.score-choice.tone-low input:checked + span {
  border-color: var(--coral-100);
  background: var(--coral-50);
  color: var(--coral-600);
}

.score-choice.tone-mid input:checked + span {
  border-color: #F1E2A8;
  background: var(--yellow-50);
  color: #8A6A0E;
}

.score-choice.tone-good input:checked + span,
.score-choice.tone-strong input:checked + span,
.score-choice.tone-excellent input:checked + span {
  border-color: var(--green-100);
  background: var(--green-50);
  color: var(--green-700);
}

.score-scale-happiness .score-choice span {
  max-width: 100%;
  min-width: 0;
  min-height: 34px;
}

.optional-block {
  padding: 0;
}

.optional-block summary {
  display: grid;
  gap: 2px;
  padding: var(--s-4);
  cursor: pointer;
  list-style: none;
}

.optional-block summary::-webkit-details-marker {
  display: none;
}

.optional-block summary h3 {
  margin: 0;
}

.optional-block summary small {
  color: var(--ink-500);
  font-size: var(--fs-12);
}

.optional-body {
  display: grid;
  gap: var(--s-4);
  padding: 0 var(--s-4) var(--s-4);
}

.feedback-reviewers,
.reviewer-row {
  display: grid;
  gap: var(--s-3);
}

.reviewer-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.invite-list-wrap {
  display: grid;
  gap: var(--s-3);
  margin-top: var(--s-4);
}

.invite-list-wrap h4 {
  margin: 0;
  color: var(--ink-900);
  font-size: var(--fs-15);
}

.invite-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s-2);
  align-items: center;
  width: min(100%, 620px);
}

.invite-link input {
  min-width: 0;
  background: var(--surface-sunken);
  color: var(--ink-700);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
}

.mail-draft-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-top: var(--s-2);
}

.mail-draft-actions button {
  min-height: 34px;
}

.mail-draft {
  margin-top: var(--s-2);
}

.mail-draft summary {
  cursor: pointer;
  color: var(--ink-700);
  font-size: var(--fs-13);
  font-weight: 650;
}

.mail-draft pre {
  white-space: pre-wrap;
  margin: var(--s-2) 0 0;
  padding: var(--s-3);
  border: 1px solid var(--rule);
  border-radius: var(--r-8);
  background: var(--surface-sunken);
  color: var(--ink-700);
  font: inherit;
  font-size: var(--fs-13);
}

.timeline > li.plan-flow-item {
  grid-template-columns: max-content minmax(0, 1fr) minmax(180px, auto);
  align-items: start;
}

.timeline > li.timeline-completion {
  grid-template-columns: 1fr;
  padding-top: 0;
  border-top: 0;
}

.completion-block {
  border: 1px solid var(--rule);
  border-radius: var(--r-8);
  background: var(--surface-sunken);
}

.completion-block summary {
  padding: var(--s-4);
  color: var(--ink-900);
  font-weight: 650;
  cursor: pointer;
}

.completion-block .scale-note,
.completion-block .form-grid {
  margin: 0;
  padding: 0 var(--s-4) var(--s-4);
}

.catalog-card .row-actions {
  grid-column: 1 / -1;
  justify-content: flex-start;
  padding-top: var(--s-3);
  border-top: 1px solid var(--rule);
}

.catalog-card .row-actions form {
  margin: 0;
}

@media (max-width: 960px) {
  .catalog-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .catalog-row .status,
  .catalog-row form {
    justify-self: start;
  }

  .reviewer-row,
  .form-grid,
  .people-create-form {
    grid-template-columns: 1fr;
  }

  .form-grid button,
  .people-create-form button {
    grid-column: 1;
  }

  .timeline > li.plan-flow-item {
    grid-template-columns: 1fr;
  }

  .timeline > li.plan-flow-item > .status {
    justify-self: start;
  }

  .agreement-card,
  .agreement-editor-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .sa-brand.brand-card {
    gap: var(--s-2);
  }

  .sa-brand__wordmark,
  .sa-brand__name {
    flex: 1 1 auto;
    white-space: normal;
  }

  .sa-brand__wordmark {
    font-size: var(--fs-14);
  }

  .sa-brand__name {
    text-align: right;
  }

  .sa-topbar.workspace-top {
    align-items: stretch;
    flex-direction: column;
  }

  .sa-topbar__actions {
    width: 100%;
  }

  .sa-topbar__actions .button-link {
    flex: 1 1 min(100%, 150px);
  }

  .panel,
  .compact-card,
  .feedback-card,
  .feedback-form-panel,
  .question-card,
  .score-panel,
  .happiness-group,
  .quiet-panel {
    padding: var(--s-4);
  }

  .prep-stats {
    grid-template-columns: 1fr;
  }

  .prep-stat {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }

  .prep-stat:last-child {
    border-bottom: 0;
  }

  .invite-link {
    grid-template-columns: 1fr;
  }

  .outcome-grid {
    grid-template-columns: 1fr;
  }

  .status,
  .badge,
  .sa-pill {
    min-width: 0;
    white-space: normal;
  }
}
