:root {
  color-scheme: light;
  --font-sans: "Segoe UI Variable Text", "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-strong: 650;
  /* SERVIR Global Collaborative palette (from the logo) */
  --servir-grey: #58595b;
  --servir-blue: #2380b0;
  --servir-blue-dark: #1b678f;
  --servir-navy: #0d2534;
  --servir-green: #8db33f;
  --servir-green-soft: #e6f0d2;
  /* Older names kept so existing rules follow the SERVIR palette */
  --forest-950: var(--servir-navy);
  --forest-900: var(--servir-blue-dark);
  --forest-800: #1d70a0;
  --forest-700: var(--servir-blue);
  --lime-300: var(--servir-green);
  --lime-200: var(--servir-green-soft);
  --sand-100: #f4f7f8;
  --sand-50: #fafcfd;
  --white: #ffffff;
  --ink-900: #1c2a33;
  --ink-700: #4b606c;
  --ink-500: #6c7e88;
  --line: #dbe4e8;
  --danger-700: #984039;
  --danger-100: #fff0ed;
  --auth-blue: #2380b0;
  --auth-blue-dark: #1b678f;
  --auth-navy: #0d2534;
  --shadow-sm: 0 1px 2px rgb(18 48 64 / 6%);
  --shadow-lg: 0 20px 52px rgb(18 48 64 / 12%);
  --radius-lg: 1rem;
  --radius-md: 0.625rem;
  font-family: var(--font-sans);
  background: var(--sand-100);
  color: var(--ink-900);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 20rem;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--sand-100);
  font-size: 0.9375rem;
  font-weight: var(--weight-regular);
  line-height: 1.5;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

.skip-link {
  position: fixed;
  z-index: 20;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  transform: translateY(-160%);
  border-radius: 0.5rem;
  background: var(--white);
  color: var(--forest-900);
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
}

.auth-layout {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(27rem, 1.05fr) minmax(28.75rem, 0.95fr);
}

.brand-panel {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 100vh;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  padding: clamp(2.25rem, 4vw, 3rem);
  background: linear-gradient(145deg, var(--auth-navy), #124a67 55%, #1b678f);
  color: var(--white);
}

.brand-panel::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgb(9 30 44 / 96%) 0%,
      rgb(9 35 51 / 82%) 28%,
      rgb(10 42 59 / 28%) 65%,
      rgb(8 28 39 / 72%) 100%
    ),
    linear-gradient(90deg, rgb(9 31 44 / 88%), transparent 72%);
  content: "";
  pointer-events: none;
}

.brand-panel::after {
  position: absolute;
  z-index: 1;
  right: -8rem;
  bottom: -12rem;
  width: 32rem;
  height: 32rem;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 50%;
  box-shadow:
    0 0 0 5rem rgb(255 255 255 / 2.5%),
    0 0 0 10rem rgb(255 255 255 / 2.5%);
  content: "";
}

.brand-panel__cover {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  opacity: 0.94;
  pointer-events: none;
  user-select: none;
}

.brand-lockup {
  position: relative;
  z-index: 2;
}

.servir-logo {
  display: block;
  width: min(14.4rem, 52%);
  height: auto;
  filter: brightness(0) invert(1);
}

.brand-platform {
  display: block;
  width: max-content;
  margin-top: 1.05rem;
  padding-top: 0.8rem;
  border-top: 2px solid var(--servir-green);
  color: #d7edf7;
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.mobile-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  width: 2.15rem;
  height: 2.15rem;
  padding: 0.3rem;
  grid-template-columns: 1fr 1fr;
  gap: 0.16rem;
  border: 1px solid rgb(255 255 255 / 45%);
  border-radius: 0.55rem;
  transform: rotate(45deg);
}

.brand-mark span {
  border-radius: 0.09rem;
  background: var(--lime-300);
}

.brand-mark span:nth-child(2),
.brand-mark span:nth-child(3) {
  opacity: 0.48;
}

.brand-story {
  position: relative;
  z-index: 2;
  align-self: center;
  max-width: 32.5rem;
  margin-top: -5rem;
  text-shadow: 0 2px 14px rgb(0 20 31 / 62%);
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--forest-700);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow--light {
  color: #b9d77a;
}

.brand-story h1 {
  max-width: 12ch;
  margin: 0;
  font-family: "Arial Narrow", "Segoe UI", sans-serif;
  font-size: clamp(2.35rem, 3.8vw, 3.7rem);
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.04;
}

.brand-summary {
  max-width: 29rem;
  margin: 1.15rem 0 0;
  color: #e2eff4;
  font-size: 0.83rem;
  line-height: 1.65;
}

.feature-list {
  display: grid;
  margin: 2.8rem 0 0;
  padding: 0;
  gap: 0.95rem;
  list-style: none;
}

.feature-list li {
  display: grid;
  align-items: center;
  grid-template-columns: 2.2rem 1fr;
  gap: 0.85rem;
  color: rgb(255 255 255 / 86%);
  font-size: 0.9rem;
}

.feature-list span {
  display: grid;
  width: 2.1rem;
  height: 2.1rem;
  place-items: center;
  border: 1px solid rgb(207 227 109 / 45%);
  border-radius: 50%;
  color: var(--lime-200);
  font-size: 0.68rem;
  font-weight: 800;
}

.environment-label {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  width: max-content;
  max-width: 100%;
  padding: 0.5rem 0.68rem;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 0.32rem;
  background: rgb(6 28 40 / 40%);
  color: #d8e8ee;
  font-size: 0.52rem;
  font-weight: 650;
  letter-spacing: 0.035em;
  backdrop-filter: blur(5px);
}

.auth-main {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  background: radial-gradient(circle at 70% 15%, #fff 0, #f7fafb 34%, #edf3f5 100%);
}

.auth-card {
  width: min(100%, 27.5rem);
  padding: clamp(1.75rem, 3vw, 2.25rem);
  position: relative;
  border: 1px solid #d8e2e6;
  border-top: 0;
  border-radius: 0.9rem;
  background: var(--white);
  overflow: hidden;
  box-shadow: 0 20px 60px rgb(30 66 80 / 15%);
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--servir-blue) 0%, var(--servir-blue) 55%, var(--servir-green) 100%);
}

.mobile-brand {
  display: none;
  margin-bottom: 2rem;
  color: var(--forest-900);
}

.brand-mark--dark {
  border-color: rgb(11 69 61 / 35%);
}

.brand-mark--dark span {
  background: var(--forest-700);
}

.context-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.context-badge {
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  background: #e8f4f8;
  color: var(--auth-blue-dark);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.context-badge--admin {
  background: #fff0dc;
  color: #815419;
}

.context-code {
  color: var(--ink-500);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.69rem;
  letter-spacing: 0.07em;
}

.auth-heading {
  margin: 1.8rem 0 1.5rem;
}

.auth-heading h2 {
  margin: 0;
  color: var(--ink-900);
  font-family: "Arial Narrow", "Segoe UI", sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.auth-heading > p:last-child {
  margin: 0.9rem 0 0;
  color: var(--ink-700);
  font-size: 0.91rem;
  line-height: 1.65;
}

.auth-card .eyebrow {
  color: var(--auth-blue);
}

.auth-alert {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.8rem;
  margin: 0 0 1rem;
  padding: 0.9rem;
  border: 1px solid #efc6bf;
  border-radius: 0.65rem;
  background: var(--danger-100);
  color: var(--danger-700);
}

.auth-alert[hidden] {
  display: none;
}

.auth-alert__icon {
  display: grid;
  width: 1.45rem;
  height: 1.45rem;
  place-items: center;
  border-radius: 50%;
  background: var(--danger-700);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 900;
}

.auth-alert strong {
  font-size: 0.83rem;
}

.auth-alert p {
  margin: 0.2rem 0 0;
  font-size: 0.77rem;
  line-height: 1.45;
}

.button {
  display: flex;
  min-height: 3.2rem;
  align-items: center;
  justify-content: center;
  gap: 0.72rem;
  padding: 0.75rem 1rem;
  border: 1px solid transparent;
  border-radius: 0.68rem;
  font-size: 0.87rem;
  font-weight: 800;
  text-decoration: none;
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button--primary {
  background: var(--auth-blue);
  box-shadow: 0 0.7rem 1.5rem rgb(35 128 176 / 18%);
  color: var(--white);
}

.button--primary:hover {
  background: var(--auth-blue-dark);
}

.button--primary svg {
  width: 1.2rem;
  fill: var(--white);
}

.button__arrow {
  margin-left: auto;
  font-size: 1.15rem;
  font-weight: 500;
}

.button--secondary {
  border-color: var(--auth-blue);
  background: #f7fbfd;
  color: var(--auth-blue-dark);
}

.button--secondary:hover {
  border-color: #b7cbc3;
  background: var(--sand-50);
}

/* Utility scale. `.button` is a 3.2rem hero CTA: correct for "Run assessment", far too heavy for
   Refresh, a table row or a card heading, where it dwarfed the content it acted on (backlog U4).
   Planning's own toolbar already works at 2.2rem, so this matches the workspace rather than
   inventing a third size. */
.button--compact {
  min-height: 2.2rem;
  padding: 0 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: none;
}

.button--compact:hover {
  transform: none;
}

/* A demoted row action: readable, but it must not compete with the row's one real button. */
.link-button {
  display: inline-block;
  padding: 0.2rem 0;
  margin-left: 0.6rem;
  border: 0;
  background: none;
  color: var(--auth-blue-dark);
  font: inherit;
  font-size: 0.82rem;
  text-decoration: underline;
  cursor: pointer;
}

.link-button:hover {
  text-decoration: none;
}

.link-button:disabled {
  color: var(--ink-muted, #6b7280);
  cursor: default;
}

.provider-note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  margin-top: 1rem;
  padding: 0.85rem 0.95rem;
  border-radius: 0.65rem;
  background: #f2f6f3;
  color: var(--ink-700);
}

.provider-note__icon svg {
  width: 1.15rem;
  fill: var(--forest-700);
}

.provider-note p {
  margin: 0;
  font-size: 0.77rem;
  line-height: 1.5;
}

.card-divider {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 1.5rem 0;
  color: var(--ink-500);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card-divider::before,
.card-divider::after {
  height: 1px;
  flex: 1;
  background: var(--line);
  content: "";
}

.support-copy {
  margin: 1.25rem 0 0;
  color: var(--ink-500);
  font-size: 0.73rem;
  line-height: 1.55;
  text-align: center;
}

.support-copy--admin {
  margin-top: 1rem;
}

.support-copy--admin a {
  color: var(--auth-blue-dark);
  font-weight: 800;
}

.admin-capabilities {
  display: grid;
  gap: 0.7rem;
  margin: 0 0 1.25rem;
  padding: 0;
  color: var(--ink-700);
  font-size: 0.78rem;
  line-height: 1.5;
  list-style: none;
}

.admin-capabilities li {
  position: relative;
  padding-left: 1.4rem;
}

.admin-capabilities li::before {
  position: absolute;
  top: 0.12rem;
  left: 0;
  color: var(--auth-blue-dark);
  content: "✓";
  font-weight: 900;
}

.registration-steps {
  display: grid;
  gap: 0.65rem;
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
}

.registration-steps li {
  display: grid;
  grid-template-columns: 1.75rem 1fr;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink-700);
  font-size: 0.76rem;
  line-height: 1.45;
}

.registration-steps span {
  display: grid;
  width: 1.75rem;
  height: 1.75rem;
  place-items: center;
  border-radius: 50%;
  background: var(--forest-900);
  color: var(--lime-200);
  font-size: 0.68rem;
  font-weight: 850;
}

.registration-limit {
  margin: 1rem 0;
  padding: 0.8rem;
  border-radius: 0.6rem;
  background: var(--sand-100);
  color: var(--ink-700);
  font-size: 0.72rem;
  line-height: 1.5;
}

.auth-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 1rem;
  color: var(--ink-500);
  font-size: 0.68rem;
}

.workspace-body {
  min-height: 100vh;
  margin: 0;
  background: var(--sand-100);
  color: var(--ink-900);
}

.workspace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.5rem;
  padding: 0 5vw;
  background: var(--forest-900);
  color: var(--white);
}

.workspace-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
  font-size: 0.88rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.workspace-nav {
  display: flex;
  min-height: 4.5rem;
  align-items: stretch;
  gap: 0.25rem;
  margin-left: auto;
}

.workspace-nav__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0 0.85rem;
  color: rgb(255 255 255 / 72%);
  font-size: 0.74rem;
  font-weight: 800;
  text-decoration: none;
}

.workspace-nav__link:hover,
.workspace-nav__link--active {
  color: var(--white);
}

.workspace-nav__link--active::after {
  position: absolute;
  right: 0.85rem;
  bottom: 0;
  left: 0.85rem;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--lime-300);
  content: "";
}

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

.workspace-nav__count {
  display: grid;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.25rem;
  place-items: center;
  border-radius: 999px;
  background: var(--lime-300);
  color: var(--forest-950);
  font-size: 0.62rem;
}

.workspace-signout {
  margin-left: 1rem;
  color: var(--lime-200);
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
}

.workspace-main {
  width: min(46rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) 0;
}

.workspace-main > h1 {
  max-width: 13ch;
  margin: 0.35rem 0 0;
  font-size: clamp(2.3rem, 7vw, 4.5rem);
  line-height: 0.98;
}

.workspace-intro {
  max-width: 42rem;
  margin: 1rem 0 2rem;
  color: var(--ink-700);
  line-height: 1.6;
}

.identity-card {
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--white);
  box-shadow: 0 1rem 3rem rgb(18 54 47 / 8%);
}

.identity-person {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.identity-avatar {
  display: grid;
  width: 3rem;
  height: 3rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--forest-900);
  color: var(--lime-200);
  font-size: 1.1rem;
  font-weight: 850;
}

.identity-person h2,
.identity-person p {
  margin: 0;
}

.identity-person h2 {
  font-size: 1.05rem;
}

.identity-person p {
  margin-top: 0.2rem;
  color: var(--ink-500);
  font-size: 0.78rem;
}

.platform-admin-badge,
.role-badge {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.platform-admin-badge {
  margin-top: 1rem;
  padding: 0.35rem 0.65rem;
  background: var(--lime-200);
  color: var(--forest-900);
}

.platform-admin-badge[hidden] {
  display: none;
}

.membership-section {
  margin-top: 1.75rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--line);
}

.membership-section h3 {
  margin: 0 0 0.8rem;
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.membership-list {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.membership-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 0.65rem;
  background: var(--sand-100);
}

.membership-row strong,
.membership-row span {
  display: block;
}

.membership-row div > span {
  margin-top: 0.18rem;
  color: var(--ink-500);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
}

.role-badge {
  padding: 0.35rem 0.6rem;
  background: var(--forest-900);
  color: var(--white);
}

.membership-row--empty {
  color: var(--ink-700);
  font-size: 0.78rem;
}

.workspace-note {
  margin: 1rem 0 0;
  color: var(--ink-500);
  font-size: 0.75rem;
  line-height: 1.55;
}

.admin-card {
  margin-top: 1.25rem;
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--white);
}

.admin-card[hidden] {
  display: none;
}

.admin-card__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.admin-card__heading h2 {
  margin: 0.3rem 0 0;
  font-size: 1.2rem;
}

.request-count {
  display: grid;
  min-width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border-radius: 50%;
  background: var(--lime-200);
  color: var(--forest-900);
  font-size: 0.8rem;
  font-weight: 850;
}

.admin-card__intro {
  margin: 0.8rem 0 1.2rem;
  color: var(--ink-700);
  font-size: 0.78rem;
  line-height: 1.55;
}

.assignment-form {
  display: grid;
  grid-template-columns: minmax(12rem, 1.5fr) minmax(7rem, 0.7fr) minmax(8rem, 0.7fr);
  gap: 0.75rem;
}

.assignment-form label {
  color: var(--ink-700);
  font-size: 0.68rem;
  font-weight: 800;
}

.assignment-form input,
.assignment-form select {
  width: 100%;
  min-height: 2.75rem;
  margin-top: 0.35rem;
  padding: 0 0.7rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--white);
  color: var(--ink-900);
  font: inherit;
}

.assignment-form .button {
  grid-column: 1 / -1;
  width: fit-content;
  min-height: 2.75rem;
  padding: 0 1rem;
  border: 0;
  cursor: pointer;
}

.assignment-form .button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.assignment-status {
  min-height: 1rem;
  margin: 0.75rem 0 0;
  color: var(--forest-700);
  font-size: 0.72rem;
}

:focus-visible {
  outline: 3px solid var(--lime-300);
  outline-offset: 3px;
}

@media (max-width: 64rem) {
  .auth-layout {
    grid-template-columns: minmax(23.75rem, 0.95fr) minmax(26.875rem, 1.05fr);
  }

  .brand-panel {
    padding: 2.25rem;
  }

  .brand-story h1 {
    font-size: clamp(2rem, 4vw, 3rem);
  }
}

@media (max-width: 50rem) {
  .auth-layout {
    display: flex;
    flex-direction: column;
    overflow: auto;
  }

  .brand-panel {
    order: 2;
    display: grid;
    min-height: 14.5rem;
    padding: 1.7rem 1.75rem;
    grid-template-rows: auto 1fr;
  }

  .brand-panel::before {
    background: linear-gradient(135deg, rgb(9 30 44 / 88%), rgb(27 103 143 / 72%));
  }

  .brand-panel__cover {
    display: none;
  }

  .servir-logo {
    width: 10.9rem;
  }

  .brand-platform {
    margin-top: 0.7rem;
    padding-top: 0.55rem;
    font-size: 0.5rem;
  }

  .brand-story {
    align-self: end;
    margin: 1.75rem 0 0;
    text-shadow: none;
  }

  .brand-story h1 {
    margin: 0;
    font-size: 1.65rem;
  }

  .brand-summary,
  .environment-label {
    display: none;
  }

  .auth-main {
    order: 1;
    min-height: 100vh;
    justify-content: flex-start;
    padding: 2rem 1.1rem;
  }

  .auth-card {
    margin-top: clamp(0rem, 6vh, 3rem);
  }

  .mobile-brand {
    display: none;
  }

  .assignment-form {
    grid-template-columns: 1fr;
  }

  .workspace-header {
    min-height: auto;
    flex-wrap: wrap;
    padding-top: 0.8rem;
  }

  .workspace-nav {
    order: 3;
    width: 100%;
    min-height: 3.25rem;
    margin-top: 0.65rem;
    border-top: 1px solid rgb(255 255 255 / 12%);
  }

  .workspace-nav__link {
    min-height: 3.25rem;
  }
}

@media (max-width: 28rem) {
  .auth-card {
    padding: 1.25rem;
    border-radius: 1rem;
  }

  .context-code,
  .auth-footer__separator {
    display: none;
  }

  .auth-footer {
    display: grid;
    text-align: center;
  }

}

.member-management {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #dce6e4;
}

.member-management__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.member-management__heading h3 { margin: 0; color: var(--forest-900); }
.member-table-wrap { margin-top: 0.75rem; overflow-x: auto; }
.member-table { width: 100%; border-collapse: collapse; }

.member-table th,
.member-table td {
  padding: 0.7rem;
  text-align: left;
  border-bottom: 1px solid #e0e8e6;
  color: #3b5651;
  font-size: 0.82rem;
}

.member-table td:first-child { display: grid; gap: 0.15rem; }
.member-table td:first-child span { color: #6d827e; font-size: 0.74rem; }
.member-table select { min-width: 7rem; padding: 0.45rem; border: 1px solid #cbd8d6; border-radius: 0.45rem; }

/* Planning workspace */
.planning-body {
  min-height: 100vh;
  overflow: hidden;
  background: #eef4f3;
}

.planning-header { position: relative; z-index: 1000; }

.planning-user {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--forest-900);
  font-size: 0.9rem;
  font-weight: 700;
}

.planning-shell {
  display: grid;
  grid-template-columns: minmax(340px, 34vw) 1fr;
  height: calc(100vh - 72px);
}

.assistant-pane {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  min-width: 0;
  background: #fff;
  border-right: 1px solid #d8e3e1;
}

.assistant-heading {
  padding: 1.5rem 1.75rem 1.25rem;
  border-bottom: 1px solid #e5ecea;
}

.assistant-heading h1 {
  margin: 0.3rem 0 0.65rem;
  color: #16332f;
  font-size: clamp(1.45rem, 2vw, 2rem);
  line-height: 1.12;
}

.assistant-heading p:last-child { margin: 0; color: #59716d; line-height: 1.5; }

.assistant-context {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1rem 1.5rem 0;
  padding: 0.9rem 1rem;
  border: 1px solid #cfe1e3;
  border-radius: 0.8rem;
  background: #edf7fa;
  color: #456c69;
  font-size: 0.85rem;
}

.assistant-conversation {
  min-height: 0;
  overflow-y: auto;
  padding: 1.25rem 1.5rem;
}

.assistant-message {
  display: grid;
  grid-template-columns: 2.75rem 1fr;
  gap: 0.85rem;
  align-items: start;
}

.assistant-message + .assistant-message { margin-top: 1rem; }

.assistant-message > div {
  padding: 1rem 1.1rem;
  border-radius: 0.85rem;
  background: #f2f6f5;
  color: #243d39;
  line-height: 1.5;
}

.assistant-message p { margin-top: 0; }

.assistant-avatar {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border-radius: 0.7rem;
  background: #1682b2;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  box-shadow: 0 0.35rem 0.8rem rgb(20 79 105 / 18%);
}

.planning-prompts {
  display: grid;
  gap: 0.65rem;
  margin: 1rem 0 1.25rem 3.6rem;
}

.planning-prompts button {
  padding: 0.85rem 1rem;
  text-align: left;
  border: 1px solid #d2dfdd;
  border-radius: 0.75rem;
  background: #fff;
  color: #17332f;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.planning-prompts button:hover {
  border-color: #1682b2;
  box-shadow: 0 0.25rem 0.65rem rgb(20 79 105 / 10%);
}

.planning-prompts span {
  display: block;
  margin-top: 0.25rem;
  color: #6a7f7c;
  font-size: 0.78rem;
  font-weight: 500;
}

.assistant-message--result > div { background: #edf7f4; border: 1px solid #cfe4dd; }
.chat-history .assistant-message { margin-top: 1rem; }
.assistant-message--user > div { background: #e9f3fb; border: 1px solid #c8dfee; }
.assistant-message--user .assistant-avatar { background: #506979; }
.result-copy { white-space: pre-wrap; }

.assistant-message--result a {
  display: inline-block;
  margin-top: 0.75rem;
  color: #126b91;
  font-weight: 750;
}

.planning-question {
  display: grid;
  gap: 0.65rem;
  padding: 1rem 1.5rem 1.25rem;
  border-top: 1px solid #dbe5e3;
  background: #fff;
}

.planning-question label {
  display: grid;
  gap: 0.3rem;
  color: #4d6662;
  font-size: 0.78rem;
  font-weight: 750;
}

.planning-question input,
.planning-question textarea {
  width: 100%;
  padding: 0.72rem 0.8rem;
  border: 1px solid #cbd8d6;
  border-radius: 0.6rem;
  background: #fbfdfc;
  color: #17332f;
  font: inherit;
  resize: vertical;
}

.planning-status { min-height: 1.2rem; margin: 0; color: #657b77; font-size: 0.78rem; }

.map-pane {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  background: #d9ecef;
}

.map-toolbar {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid #d5e1df;
  background: rgb(255 255 255 / 95%);
}

.map-toolbar > div:first-child { display: grid; gap: 0.15rem; }

.map-toolbar__label {
  color: #718681;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.map-toolbar__actions { display: flex; align-items: center; gap: 0.75rem; }

.map-toolbar button {
  padding: 0.55rem 0.75rem;
  border: 1px solid #cbd9d7;
  border-radius: 0.55rem;
  background: #fff;
  color: #274b45;
  cursor: pointer;
}

.map-state {
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: #eaf2f0;
  color: #52716b;
  font-size: 0.75rem;
}

.map-stage { position: relative; min-height: 0; }

.risk-map,
.sig-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.sig-map { z-index: 500; background: #fff; }

.map-legend {
  position: absolute;
  z-index: 600;
  right: 1rem;
  bottom: 1.5rem;
  display: grid;
  gap: 0.3rem;
  padding: 0.75rem;
  border: 1px solid rgb(32 72 65 / 15%);
  border-radius: 0.65rem;
  background: rgb(255 255 255 / 90%);
  color: #2e4b46;
  font-size: 0.72rem;
  box-shadow: 0 0.4rem 1rem rgb(23 51 47 / 12%);
}

.map-legend span { display: flex; align-items: center; gap: 0.4rem; }
.severity { width: 0.75rem; height: 0.75rem; border-radius: 0.15rem; }
.severity--1 { background: #fff59d; }
.severity--2 { background: #ffd166; }
.severity--3 { background: #ff9f43; }
.severity--4 { background: #f45b45; }
.severity--5 { background: #c9184a; }

.map-evidence {
  padding: 0.85rem 1rem;
  border-top: 1px solid #cedddb;
  background: #fff;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

.metric-grid article {
  display: grid;
  gap: 0.15rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.55rem;
  background: #eff6f4;
}

.metric-grid span { color: #6d827e; font-size: 0.68rem; text-transform: capitalize; }
.metric-grid strong { color: #183b35; font-size: 0.95rem; }
.map-evidence details { margin-top: 0.65rem; color: #536c67; font-size: 0.75rem; }

@media (max-width: 900px) {
  .planning-body { overflow: auto; }
  .planning-shell { grid-template-columns: 1fr; height: auto; }
  .assistant-pane { min-height: calc(100vh - 72px); }
  .map-pane { min-height: 80vh; }
  .planning-user > span,
  .workspace-nav__link:nth-child(2) { display: none; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

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

/* Platform administration and AI allowance */
.workspace-main--wide { width: min(64rem, calc(100% - 2rem)); }
button.workspace-signout { border: 0; background: none; cursor: pointer; font-family: inherit; }
.assignment-form__wide { grid-column: span 2; }
.status-pill {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: #e7efed;
  color: var(--forest-900);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: capitalize;
  white-space: nowrap;
}
.status-pill[data-state="active"] { background: var(--lime-200); }
.status-pill[data-state="limit_reached"] { background: #fde2d6; color: #8a2d0b; }
.status-pill[data-state="ai_off"] { background: #e3e7ea; color: #46545c; }
.status-pill--good { background: #dff3e9; color: #176246; }
.button--compact { min-height: 2rem; padding: 0.35rem 0.65rem; font-size: 0.72rem; white-space: nowrap; }
.ai-allowance__message { margin: 0.9rem 0 0.6rem; color: var(--ink-900); font-weight: 700; }
.ai-allowance__message.is-low { color: #9a5b00; }
.usage-meter { height: 0.5rem; border-radius: 999px; background: #e7efed; overflow: hidden; }
.usage-meter span { display: block; height: 100%; width: 0; background: var(--forest-700); }
.health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.5rem 1.25rem;
  margin: 1rem 0 0;
}
.health-grid dt { color: #6d827e; font-size: 0.7rem; font-weight: 800; }
.health-grid dd { margin: 0 0 0.6rem; color: var(--ink-900); font-size: 0.85rem; }
.health-grid dd[data-ok="true"] { color: var(--forest-700); font-weight: 800; }
.ai-reply {
  margin: 0.75rem 0 0;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--lime-300);
  background: #f4f8f7;
  color: var(--ink-900);
  font-size: 0.85rem;
}
.member-table .button { min-height: 2.1rem; padding: 0 0.7rem; cursor: pointer; }
@media (max-width: 40rem) {
  .assignment-form { grid-template-columns: 1fr; }
  .assignment-form__wide { grid-column: auto; }
}

/* Planner chat (ADR-0004) */
.planning-banner {
  margin: 0.75rem 0 0;
  padding: 0.6rem 0.8rem;
  border-radius: 0.5rem;
  background: #fff4dc;
  color: #7a4b00;
  font-size: 0.78rem;
}
.planning-publish {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  color: #536c67;
  font-size: 0.74rem;
  line-height: 1.4;
}
.result-copy { white-space: pre-wrap; }
.result-label { display: block; margin-top: 0.4rem; color: #6d827e; font-size: 0.7rem; }
.assistant-context .is-low { color: #9a5b00; }
.map-area { margin: 0 0 0.5rem; color: #3b5651; font-size: 0.75rem; }
.map-evidence ol, .map-evidence ul { padding-left: 1.1rem; }

/* Flood assessment (Increment 1) */
.synthetic-banner {
  margin: 0 0 1rem;
  padding: 0.6rem 0.8rem;
  border-radius: 0.5rem;
  background: #fde68a;
  color: #713f12;
  font-size: 0.78rem;
  font-weight: 800;
}
.incompatible-banner {
  margin: 0 0 1rem;
  padding: 0.8rem 1rem;
  border: 1px solid #dc2626;
  border-radius: 0.65rem;
  background: #fff1f2;
  color: #991b1b;
  font-weight: 700;
}
.assessment-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* The area finder is a shortcut across the whole form, not one field beside another, so it spans
   and is separated from the three selects it fills in (backlog U4). */
.assessment-form label:has([data-area-search]) {
  grid-column: 1 / -1;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--line);
}
.assessment-result-actions { display: flex; align-items: center; gap: 0.65rem; flex-wrap: wrap; }
.metric-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 0.75rem;
}
.metric-row article { padding: 0.8rem; border: 1px solid var(--line); border-radius: 0.75rem; }
.metric-row span { display: block; color: #6d827e; font-size: 0.7rem; font-weight: 800; }
.metric-row strong { font-size: 1.6rem; color: var(--forest-900); }
.trust-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.9rem; }
.result-map { height: 22rem; border-radius: 0.75rem; border: 1px solid var(--line); }
.map-key { display: flex; flex-wrap: wrap; gap: 1rem; margin: 0.6rem 0; font-size: 0.72rem; color: #536c67; }
.dot { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 50%; vertical-align: middle; }
.dot--exposed { background: #c2410c; }
.dot--not { background: #0f766e; }
.dot--unable { background: #6b7280; }
.result-details { margin-top: 1rem; font-size: 0.8rem; color: #3b5651; }
.result-details h3 { margin: 0.8rem 0 0.2rem; font-size: 0.8rem; }
@media (max-width: 40rem) { .assessment-form { grid-template-columns: 1fr; } }

/* Planning map workspace */
.chat-mode { display: grid; gap: 0.35rem; margin: 0.75rem 0 0; font-size: 0.78rem; color: #3b5651; }
.chat-mode label { display: flex; gap: 0.45rem; align-items: baseline; }
.chat-mode small { color: #6d827e; }
.map-toolbar__actions select { min-height: 2.2rem; border: 1px solid #cbd8d6; border-radius: 0.45rem; padding: 0 0.4rem; }
.map-toolbar__actions .button { min-height: 2.2rem; padding: 0 0.8rem; border: 0; cursor: pointer; }
.map-toolbar__actions .button:disabled { opacity: 0.5; cursor: not-allowed; }
.layer-panel {
  position: absolute;
  z-index: 800;
  top: 0.75rem;
  right: 0.75rem;
  display: grid;
  gap: 0.3rem;
  width: min(15rem, 70%);
  padding: 0.7rem 0.8rem;
  border-radius: 0.6rem;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  font-size: 0.72rem;
  color: #243b37;
}
.layer-panel label { display: flex; gap: 0.35rem; align-items: center; }
.layer-panel .is-disabled { color: #9aa7a4; }
.layer-panel small { color: #7b8a87; line-height: 1.35; }
.flood-legend, .center-legend { display: grid; gap: 0.15rem; padding-left: 1.2rem; color: #536c67; }
.swatch { display: inline-block; width: 0.9rem; height: 0.6rem; border: 1px solid #cbd5e1; vertical-align: middle; }
.dot--pending { background: #fff; border: 2px solid #374151; box-sizing: border-box; }
.layer-panel__back { border: 1px solid #cbd8d6; border-radius: 0.4rem; background: #fff; cursor: pointer; }
.map-stage { position: relative; }

/* Shared top bar for all signed-in pages (rendered by grp-common.js) */
.grp-topbar {
  position: sticky;
  top: 0;
  z-index: 1200;
  display: flex;
  flex: none;
  align-items: center;
  gap: 0.85rem;
  height: 56px;
  padding: 0 0.85rem;
  background: #ffffff;
  color: #3a3b3d;
  border-bottom: 1px solid #e3e8e6;
  box-shadow: 0 1px 3px rgba(16, 40, 36, 0.06);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
}
.grp-topbar:empty { min-height: 56px; }
.grp-topbar__brand {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}
.grp-topbar__logo { display: block; width: auto; height: 25px; }
.grp-topbar__product {
  padding-left: 0.85rem;
  border-left: 2px solid var(--servir-green);
  color: var(--servir-grey);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}
.grp-topbar__nav {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: flex-start;
  gap: 0.15rem;
  min-width: 0;
}
/* Top-level links and menu buttons share one look. */
.grp-topbar__link,
.grp-menu__button {
  flex: none;
  padding: 0.36rem 0.58rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #4b4d50;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.grp-menu__button::after { content: " ▾"; color: #8a9396; font-size: 0.7rem; }
.grp-topbar__link:hover,
.grp-menu__button:hover,
.grp-menu.is-open > .grp-menu__button { color: var(--servir-blue-dark); background: #eef5fa; }
.grp-topbar__link.is-active,
.grp-menu__button.is-active { color: #ffffff; background: var(--servir-blue); }
.grp-menu__button.is-active::after { color: #dbe9f3; }
.grp-topbar__link:focus-visible,
.grp-menu__button:focus-visible,
.grp-menu__panel a:focus-visible,
.grp-menu__panel button:focus-visible { outline: 2px solid var(--servir-green); outline-offset: 2px; }
.grp-topbar__link[hidden], .grp-menu[hidden], .grp-menu__panel [hidden] { display: none; }

/* Drop-down panels. */
.grp-menu { position: relative; }
.grp-menu__panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 1300;
  display: none;
  min-width: 15rem;
  padding: 0.35rem;
  border: 1px solid #e3e8e6;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgb(16 40 36 / 16%);
}
.grp-menu.is-open > .grp-menu__panel { display: grid; gap: 0.1rem; }
.grp-menu__panel a,
.grp-menu__panel button {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #33363a;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.grp-menu__panel a:hover, .grp-menu__panel button:hover { background: #f1f6f9; }
.grp-menu__panel a.is-active { color: var(--servir-blue-dark); background: #eaf3f9; }
.grp-menu__note { color: #2f7a4a; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.grp-menu__note.is-soon { color: #8a9396; }
.grp-menu__panel a.is-soon { color: #8a9396; cursor: default; }
.grp-menu__panel a.is-soon:hover { background: transparent; }
.grp-menu[data-menu="user"] .grp-menu__panel { right: 0; left: auto; min-width: 12rem; }

.grp-topbar__user { display: flex; flex: none; align-items: center; gap: 0.6rem; }
.grp-topbar__name { max-width: 12rem; overflow: hidden; text-overflow: ellipsis; }
.grp-topbar__burger {
  display: none;
  margin-left: auto;
  width: 38px;
  height: 38px;
  border: 1px solid #cfd6d4;
  border-radius: 10px;
  background: #ffffff;
  color: #3a3b3d;
  font-size: 1.1rem;
  cursor: pointer;
}
@media (max-width: 1200px) {
  .grp-topbar__product { display: none; }
}
/* Phones and narrow windows: the menu becomes a list under the bar, opened with ☰. */
@media (max-width: 900px) {
  .grp-topbar { flex-wrap: wrap; height: auto; min-height: 56px; padding: 0.45rem 0.65rem; }
  .grp-topbar__logo { height: 22px; }
  .grp-topbar__burger { display: inline-grid; place-items: center; order: 2; }
  .grp-topbar__user { order: 3; }
  .grp-topbar__name { max-width: 7rem; }
  .grp-topbar__nav {
    display: none;
    order: 4;
    flex: 1 0 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.1rem;
    padding: 0.4rem 0 0.3rem;
    border-top: 1px solid #edf1f0;
  }
  .grp-topbar.is-menu-open .grp-topbar__nav { display: flex; }
  .grp-topbar__nav .grp-menu__button { width: 100%; text-align: left; border-radius: 8px; }
  .grp-topbar__nav .grp-topbar__link { border-radius: 8px; }
  .grp-topbar__nav .grp-menu__panel { position: static; display: grid; min-width: 0; padding: 0 0 0.3rem 0.8rem; border: 0; box-shadow: none; }
  .grp-topbar__nav .grp-menu__button::after { content: ""; }
}

/* Calmer page headings next to the shared top bar */
.workspace-body { min-height: 100vh; background: #f4f7f6; }
.workspace-main { padding: clamp(1.75rem, 4vw, 2.75rem) 0 3rem; }
.workspace-main > h1 {
  max-width: none;
  margin: 0.25rem 0 0;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.workspace-intro { margin-top: 0.5rem; }

/* Full-colour SERVIR logo on light backgrounds (mobile sign-in header) */
.mobile-brand .servir-logo--color { width: 11rem; filter: none; }

/* Professional interface system: restrained type scale, controls and surfaces. */
h1, h2, h3 { font-family: var(--font-display); font-weight: var(--weight-strong); }
h4, h5, h6, strong { font-weight: var(--weight-semibold); }

.eyebrow {
  font-size: 0.68rem;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.095em;
}

.brand-platform,
.context-badge,
.card-divider {
  font-weight: var(--weight-semibold);
  letter-spacing: 0.08em;
}

.brand-story h1 {
  max-width: 14ch;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 3.35vw, 3.25rem);
  font-weight: var(--weight-strong);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.brand-summary { font-size: 0.86rem; line-height: 1.7; }

.auth-main { background: radial-gradient(circle at 70% 15%, #ffffff 0, #f8fafb 34%, #eef3f5 100%); }
.auth-card {
  border-color: #dce5e9;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.auth-heading { margin: 1.5rem 0 1.25rem; }
.auth-heading h2 {
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 2.5vw, 2rem);
  font-weight: var(--weight-strong);
  letter-spacing: -0.025em;
  line-height: 1.15;
}
.auth-heading > p:last-child { font-size: 0.89rem; line-height: 1.6; }

.button {
  min-height: 2.9rem;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  font-weight: var(--weight-semibold);
  letter-spacing: 0;
}
.button--primary { box-shadow: 0 0.45rem 1.1rem rgb(35 128 176 / 14%); }
.button__arrow { font-size: 1rem; }
.provider-note { border: 1px solid #e4eceb; border-radius: var(--radius-md); }
.provider-note p, .support-copy { font-size: 0.75rem; }
.support-copy--admin a { font-weight: var(--weight-semibold); }

.workspace-main > h1 {
  font-size: clamp(1.6rem, 2.75vw, 2.15rem);
  font-weight: var(--weight-strong);
  letter-spacing: -0.025em;
}
.workspace-intro { font-size: 0.92rem; }
.identity-card, .admin-card {
  border-color: #dfe7ea;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.identity-person h2 { font-weight: var(--weight-strong); }
.admin-card__heading h2 { font-size: 1.1rem; font-weight: var(--weight-strong); }
.assignment-form label,
.health-grid dt,
.metric-row span,
.member-table th { font-weight: var(--weight-semibold); }
.assignment-form input,
.assignment-form select,
.member-table select {
  border-color: #cbd8de;
  border-radius: var(--radius-md);
  box-shadow: inset 0 1px 1px rgb(18 48 64 / 2%);
}
.assignment-form input:focus,
.assignment-form select:focus,
.member-table select:focus {
  border-color: var(--servir-blue);
  outline: 3px solid rgb(35 128 176 / 14%);
  outline-offset: 0;
}
.member-table th {
  color: var(--ink-500);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.member-table td { color: var(--ink-700); }
.role-badge,
.platform-admin-badge,
.status-pill { font-weight: var(--weight-semibold); }

/* No height here: the base rule already sets 56px, and repeating it after the phone media query
   pinned the wrapped two-row bar to 56px, so its menu spilled over the page below. */
.grp-topbar {
  border-bottom-color: #e2e8eb;
  box-shadow: 0 1px 2px rgb(18 48 64 / 5%);
  font-family: var(--font-sans);
}
.grp-topbar:empty { min-height: 56px; }
.grp-topbar__product { font-weight: var(--weight-semibold); }
.grp-topbar__link,
.grp-menu__button { font-size: 0.78rem; font-weight: var(--weight-medium); }
.grp-topbar__link.is-active,
.grp-menu__button.is-active { font-weight: var(--weight-semibold); }

@media (max-width: 50rem) {
  .brand-story h1 { font-size: 1.55rem; }
}

/* ---------- Admin data inspector (ADR-0006) ---------- */

.inspector-warning {
  width: min(64rem, calc(100% - 2rem));
  margin: 0 auto 1.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid #f0c9a8;
  border-left: 4px solid #c2410c;
  border-radius: var(--radius-md);
  background: #fff7ed;
  color: #7c3a10;
  font-size: 0.9rem;
  line-height: 1.5;
}

[data-validation-profile] {
  display: block;
  width: min(38rem, 100%);
  margin: 0.35rem 0 0.5rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--ink-900);
  font: inherit;
}

.inspector-simple-summary {
  margin: 0 0 1.25rem;
  padding: 1rem;
  border: 1px solid #b9d9d2;
  border-left: 4px solid var(--servir-green);
  border-radius: var(--radius-md);
  background: #f3faf8;
}

.inspector-simple-summary h3 { margin: 0 0 0.4rem; }
.inspector-simple-summary > p { margin: 0.25rem 0; line-height: 1.55; }

.inspector-folders {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.inspector-folder {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--white);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
}

.inspector-folder:hover,
.inspector-folder:focus-visible {
  border-color: var(--servir-blue);
  background: var(--sand-50);
}

.inspector-folder__name {
  font-weight: var(--weight-semibold);
  color: var(--ink-900);
}

.inspector-folder__meta {
  color: var(--ink-500);
  font-size: 0.85rem;
}

.inspector-folder.is-plain .inspector-folder__name {
  font-weight: var(--weight-regular);
  color: var(--ink-700);
}

.inspector-bar {
  height: 0.4rem;
  margin-top: 0.75rem;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.inspector-bar > span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--servir-blue);
  transition: width 400ms ease;
}

.library-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
  margin: 1rem 0 0.65rem;
}

.library-actions .button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.library-bootstrap {
  margin: 1.25rem 0;
  padding: 1.1rem 1.2rem;
  border: 1px solid #b9d7e4;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #f4fafc, #fff);
}

.library-bootstrap__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.library-bootstrap h2 { margin: 0; font-size: 1.2rem; }
.library-bootstrap .status-pill--success { background: #dcefe5; color: #275c46; }
.library-bootstrap > p { margin: 0.65rem 0; color: var(--ink-700); font-size: 0.88rem; }

.library-bootstrap__categories {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 0.9rem;
}

.library-bootstrap__item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.05rem 0.5rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-md);
  background: #eef2f3;
}

.library-bootstrap__item.is-ready { background: #e7f4ed; color: #275c46; }
.library-bootstrap__item small { grid-column: 2; color: var(--ink-500); font-size: 0.7rem; }
.library-bootstrap__dot { grid-row: 1 / span 2; font-weight: var(--weight-strong); }
.library-bootstrap .library-bootstrap__next { color: var(--ink-500); font-size: 0.76rem; }

@media (max-width: 42rem) {
  .library-bootstrap__categories { grid-template-columns: 1fr; }
}

.library-upload {
  margin: 1rem 0 1.25rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid #bed8e4;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #f7fbfd 0%, #fff 72%);
}

.library-upload h3 {
  margin: 0 0 0.35rem;
  font-size: 1.08rem;
  font-weight: var(--weight-strong);
}

.library-upload__heading,
.library-version-heading,
.library-version-card__head,
.library-version-card__foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.library-upload__privacy {
  color: var(--ink-500);
  font-size: 0.78rem;
  white-space: nowrap;
}

.library-upload__intro {
  max-width: 54rem;
  margin: 0.55rem 0 0;
  color: var(--ink-700);
  font-size: 0.88rem;
}

.library-upload__steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.5rem;
  margin: 1rem 0;
  padding: 0;
  color: var(--ink-700);
  font-size: 0.8rem;
  list-style: none;
}

.library-upload__steps li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.library-upload__steps li span {
  display: inline-grid;
  width: 1.35rem;
  height: 1.35rem;
  place-items: center;
  border-radius: 999px;
  background: #e5f1f6;
  color: var(--servir-blue-dark);
  font-size: 0.72rem;
  font-weight: var(--weight-semibold);
}

.library-upload__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
}

.library-file-picker {
  position: relative;
  display: inline-flex;
  min-height: 2.65rem;
  align-items: center;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--servir-blue);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--servir-blue-dark);
  font-size: 0.86rem;
  font-weight: var(--weight-semibold);
  cursor: pointer;
}

.library-file-picker:hover,
.library-file-picker:focus-within {
  background: #eef7fb;
  outline: 3px solid rgb(35 128 176 / 10%);
}

.library-file-picker input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.library-file-name {
  max-width: 24rem;
  overflow: hidden;
  color: var(--ink-700);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-upload__note {
  margin: 0.7rem 0 0;
  color: var(--ink-500);
  font-size: 0.78rem;
}

.library-source-tag {
  display: inline-flex;
  margin-bottom: 0.35rem;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.library-source-tag--local { background: #e1f2f9; color: #145f86; }
.library-source-tag--platform { background: #e7f2e6; color: #306539; }
.library-source-tag--demo { background: #edf0f2; color: #5d6870; }

.library-version-heading {
  align-items: flex-end;
  margin: 1.45rem 0 0.75rem;
}

.library-version-heading h3 {
  margin: 0;
  font-size: 1.03rem;
  font-weight: var(--weight-strong);
}

.library-version-heading p {
  margin: 0.2rem 0 0;
  color: var(--ink-500);
  font-size: 0.82rem;
}

.library-planning-link {
  color: var(--servir-blue-dark);
  font-size: 0.83rem;
  font-weight: var(--weight-semibold);
  text-decoration: none;
  white-space: nowrap;
}

.library-planning-link:hover { text-decoration: underline; }

.library-version-list {
  display: grid;
  gap: 0.75rem;
}

.library-version-empty {
  margin: 0;
  padding: 1rem;
  border: 1px dashed #c8d6dc;
  border-radius: var(--radius-md);
  color: var(--ink-500);
  text-align: center;
}

.library-version-card {
  padding: 1rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.library-version-card.is-active {
  border-color: #79b5ce;
  border-left: 4px solid var(--servir-blue);
  background: #f7fbfd;
}

.library-version-card.is-demo { background: #fafbfb; }

.library-version-card__identity { min-width: 0; }

.library-version-card__title {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink-900);
  font-size: 0.98rem;
  font-weight: var(--weight-strong);
}

.library-version-card__meta {
  margin: 0.18rem 0 0;
  color: var(--ink-500);
  font-size: 0.76rem;
}

.library-use-badge {
  flex: 0 0 auto;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: #edf0f2;
  color: var(--ink-700);
  font-size: 0.72rem;
  font-weight: var(--weight-semibold);
  white-space: nowrap;
}

.library-use-badge.is-active { background: #dceff5; color: #145f86; }

.library-version-card__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 0.85rem 0 0;
}

.library-version-card__metrics > div {
  padding: 0.55rem 0.65rem;
  border-radius: 0.55rem;
  background: #f3f6f7;
}

.library-version-card__metrics dt {
  color: var(--ink-500);
  font-size: 0.7rem;
}

.library-version-card__metrics dd {
  margin: 0.1rem 0 0;
  color: var(--ink-900);
  font-size: 1rem;
  font-weight: var(--weight-semibold);
}

.library-version-card__name-note {
  margin: 0.65rem 0 0;
  padding: 0.45rem 0.6rem;
  border-radius: 0.45rem;
  color: var(--ink-700);
  font-size: 0.76rem;
}

.library-version-card__name-note.is-warning { background: #fff4df; color: #78551b; }
.library-version-card__name-note.is-good { background: #e9f5ec; color: #356541; }
.library-version-card__name-note.is-neutral { background: #f3f6f7; }

.library-version-card__foot {
  align-items: center;
  margin-top: 0.7rem;
}

.library-version-card__version {
  color: var(--ink-500);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.library-version-card__action {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--servir-blue-dark);
  font: inherit;
  font-size: 0.8rem;
  font-weight: var(--weight-semibold);
  text-decoration: none;
  cursor: pointer;
}

.library-version-card__action:hover { text-decoration: underline; }

@media (max-width: 42rem) {
  .library-upload__heading,
  .library-version-heading,
  .library-version-card__head,
  .library-version-card__foot {
    align-items: flex-start;
    flex-direction: column;
  }
  .library-upload__privacy { white-space: normal; }
  .library-file-name { max-width: 100%; }
  .library-version-card__metrics { grid-template-columns: 1fr; }
  .library-use-badge { white-space: normal; }
}

.inspector-tally {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0.5rem 0 1.25rem;
}

.inspector-tally__item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 7rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--white);
}

.inspector-tally__item strong {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.1;
}

.inspector-tally__item span {
  color: var(--ink-500);
  font-size: 0.82rem;
}

.inspector-tally__item.is-blocker { border-left: 4px solid #98243a; }
.inspector-tally__item.is-problem { border-left: 4px solid #c2410c; }
.inspector-tally__item.is-known { border-left: 4px solid var(--ink-500); }

.inspector-findings {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.inspector-finding {
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--white);
}

.inspector-finding.is-blocker { border-left: 4px solid #98243a; background: #fff5f5; }
.inspector-finding.is-problem { border-left: 4px solid #c2410c; background: #fff8f2; }
.inspector-finding.is-known { border-left: 4px solid var(--ink-500); background: var(--sand-50); }

.inspector-finding__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
}

.inspector-finding__head h4 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: var(--weight-strong);
}

.inspector-finding__grade {
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: rgb(18 48 64 / 8%);
  color: var(--ink-700);
  font-size: 0.72rem;
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.inspector-finding p {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ink-700);
}

.inspector-finding__action { color: var(--ink-900); font-weight: var(--weight-medium); }
.inspector-finding__affects { color: var(--ink-500); font-size: 0.82rem; }

.inspector-subheading {
  margin: 1.75rem 0 0.35rem;
  font-size: 1rem;
  font-weight: var(--weight-strong);
}

.inspector-note {
  margin: 0 0 0.75rem;
  color: var(--ink-700);
  font-size: 0.88rem;
  line-height: 1.55;
}

.inspector-map {
  height: 24rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.inspector-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1rem;
  margin: 0.5rem 0 0;
  color: var(--ink-700);
  font-size: 0.85rem;
}

.inspector-legend .dot {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  margin-inline-end: 0.25rem;
  border-radius: 999px;
  vertical-align: baseline;
}

.dot--inside { background: #2f8f4e; }
.dot--mismatch { background: #c2410c; }
.dot--outside { background: #98243a; }

.table-scroll { overflow-x: auto; }

.inspector-table { width: 100%; font-size: 0.86rem; }
.inspector-table td { vertical-align: top; }

.inspector-columns {
  margin-bottom: 0.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--white);
}

.inspector-columns > summary {
  padding: 0.6rem 0.9rem;
  cursor: pointer;
  font-weight: var(--weight-semibold);
}

.inspector-columns .inspector-table { padding: 0 0.9rem 0.9rem; }

.inspector-flag {
  display: inline-block;
  margin-inline-start: 0.4rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: #fde8d4;
  color: #8a4b12;
  font-size: 0.7rem;
  font-weight: var(--weight-semibold);
}

.inspector-error {
  width: min(64rem, calc(100% - 2rem));
  margin: 1rem auto 0;
  padding: 0.85rem 1rem;
  border: 1px solid #e8b4ad;
  border-radius: var(--radius-md);
  background: var(--danger-100);
  color: var(--danger-700);
  font-size: 0.9rem;
}

@media (max-width: 40rem) {
  .inspector-map { height: 18rem; }
  .inspector-tally__item { min-width: 5.5rem; flex: 1; }
}

/* Background jobs: top bar reminder and finish notices (grp-common.js). */
.grp-topbar__jobs {
  max-width: 18rem;
  overflow: hidden;
  padding: 0.3rem 0.75rem 0.3rem 1.55rem;
  border-radius: 999px;
  background: var(--servir-green-soft) no-repeat 0.6rem 50% / 0.55rem 0.55rem
    radial-gradient(circle, var(--servir-green) 60%, transparent 62%);
  color: var(--servir-navy);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.grp-topbar__jobs[hidden] { display: none; }
.grp-toasts {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: min(24rem, calc(100vw - 2rem));
}
.grp-toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-left: 4px solid var(--servir-green);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 6px 20px rgba(13, 37, 52, 0.18);
  color: var(--ink-900);
  font-size: 0.88rem;
}
.grp-toast.is-failed { border-left-color: var(--danger-700); }
.grp-toast p { flex: 1; margin: 0; }
.grp-toast a { color: var(--servir-blue-dark); font-weight: 600; }
.grp-toast button {
  border: 0;
  background: none;
  color: var(--ink-500);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
@media (max-width: 860px) {
  .grp-topbar__jobs { max-width: 9rem; }
}

/* District preview (web/data-preview.js): unapproved data on the map, with its warnings. */
.preview-ask label { display: block; margin-bottom: 0.4rem; font-weight: 600; }
.preview-ask__row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.preview-ask__row input {
  flex: 1 1 16rem;
  min-width: 0;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}
.preview-chip {
  margin: 0.2rem 0.3rem 0.2rem 0;
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--servir-blue-dark);
  font: inherit;
  font-size: 0.84rem;
  cursor: pointer;
}
.preview-chip:hover { border-color: var(--servir-blue); background: #eef5fa; }
.preview-candidates { margin-top: 0.8rem; }
.preview-label { background: #fff5f5; color: #98243a; }
.preview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 24rem);
  gap: 1rem;
  margin-top: 1rem;
  align-items: start;
}
.preview-map { height: 560px; margin: 0; }
.preview-warnings .inspector-subheading { margin-top: 0; }
.preview-legend__row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.9rem; margin: 0.6rem 0 0; font-size: 0.82rem; }
.preview-legend__item { display: inline-flex; align-items: center; gap: 0.35rem; }
.preview-legend__dot { width: 0.75rem; height: 0.75rem; border-radius: 50%; border: 1px solid #fff; box-shadow: 0 0 0 1px #9aa9b1; }
.preview-legend__box { width: 1rem; height: 0.75rem; border: 1px solid #9aa9b1; }
.preview-legend__hatch {
  background: repeating-linear-gradient(45deg, rgba(150, 60, 160, 0.6) 0 2px, transparent 2px 6px) !important;
}
@media (max-width: 960px) {
  .preview-layout { grid-template-columns: 1fr; }
  .preview-map { height: 420px; }
}
