:root {
  --sail-green: #7ad957;
  --sail-green-dark: #236b31;
  --sail-green-deep: #123f1d;
  --sail-green-soft: #ecffe7;
  --ink: #142119;
  --ink-2: #223227;
  --muted: #53645a;
  --paper: #ffffff;
  --fog: #f5f8f3;
  --mist: #fbfff8;
  --line: rgba(20, 33, 25, .14);
  --line-strong: rgba(20, 33, 25, .24);
  --danger: #9f1239;
  --danger-bg: #fff0f3;
  --warn: #8a4b00;
  --warn-bg: #fff7e6;
  --ok: #0f6b37;
  --ok-bg: #e7f6ed;
  --info-bg: #eef8f1;
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --shadow: 0 18px 48px rgba(17, 42, 22, .10);
  --shadow-soft: 0 10px 28px rgba(17, 42, 22, .07);
  --max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(122, 217, 87, .18), transparent 32rem),
    linear-gradient(180deg, #fbfff8 0%, #f5f8f3 44%, #ffffff 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.55;
}

a { color: var(--sail-green-dark); text-decoration: none; font-weight: 750; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(35, 107, 49, .36);
  outline-offset: 3px;
}

.sr-only,
.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 2000;
  background: var(--sail-green);
  color: #102715;
  border-radius: 999px;
  padding: 10px 14px;
  box-shadow: var(--shadow-soft);
}

/* Application shell */
.app-body { overflow-x: hidden; }
.ssp-shell { min-height: 100vh; display: flex; flex-direction: column; }
.ssp-main { width: min(var(--max), calc(100% - 32px)); margin: 24px auto 36px; flex: 1; }
.ssp-footer { width: min(var(--max), calc(100% - 32px)); margin: 0 auto 28px; color: var(--muted); font-size: .9rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 18px; align-items: center; border-top: 1px solid var(--line); padding-top: 18px; }
.footer-inner strong { color: var(--ink); display: block; }
.footer-inner span { display: block; }
.footer-note { text-align: right; }

/* Header and navigation */
.ssp-top {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(16, 32, 22, .05);
  backdrop-filter: blur(14px);
}

.top-inner {
  width: min(1440px, calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.brand-cluster {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 205px;
  color: var(--ink);
  text-decoration: none;
}
.brand-cluster:hover { text-decoration: none; }
.brand-mark {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 4px;
  background: linear-gradient(145deg, rgba(122, 217, 87, .16), rgba(255, 255, 255, .96));
  border: 1px solid rgba(122, 217, 87, .36);
  box-shadow: 0 8px 18px rgba(47, 143, 61, .12);
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand-text strong { display: block; color: var(--ink); font-size: 1rem; line-height: 1.05; letter-spacing: .01em; font-weight: 950; }
.brand-text span { display: block; color: var(--muted); font-size: .76rem; font-weight: 800; margin-top: 2px; }

.ssp-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
}
.nav-node { position: relative; display: inline-flex; align-items: center; }
.nav-node.has-children::after {
  content: "";
  position: absolute;
  left: -10px;
  right: -10px;
  top: 100%;
  height: 16px;
  pointer-events: auto;
}
.nav-link,
.ssp-nav > a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: #24372a;
  background: transparent;
  text-decoration: none;
  font-size: .9rem;
  font-weight: 900;
  line-height: 1;
  touch-action: manipulation;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.nav-link:hover,
.nav-node:hover > .nav-link,
.nav-node:focus-within > .nav-link,
.nav-node.open > .nav-link {
  background: var(--sail-green-soft);
  border-color: rgba(35, 107, 49, .18);
  color: #0f2a17;
  text-decoration: none;
}
.nav-link.active,
.nav-node.active > .nav-link {
  background: var(--sail-green);
  border-color: rgba(35, 107, 49, .18);
  color: #0b2111;
  box-shadow: 0 10px 22px rgba(47, 143, 61, .18);
}
.nav-caret { font-size: .72rem; opacity: .85; transform: translateY(-1px); transition: transform .16s ease; }
.nav-node:hover .nav-caret,
.nav-node:focus-within .nav-caret,
.nav-node.open .nav-caret { transform: translateY(-1px) rotate(180deg); }
.nav-dropdown {
  position: absolute;
  top: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  min-width: 228px;
  max-width: min(320px, calc(100vw - 32px));
  max-height: min(70vh, calc(100vh - 96px));
  overflow: auto;
  display: grid;
  gap: 4px;
  padding: 8px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 18px 42px rgba(16, 32, 22, .16);
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .14s ease, transform .14s ease, visibility .14s ease;
}
.nav-dropdown::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -14px;
  height: 14px;
}
.nav-node:hover .nav-dropdown,
.nav-node:focus-within .nav-dropdown,
.nav-node.open .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.ssp-nav .nav-node:last-child .nav-dropdown,
.ssp-nav .nav-node:nth-last-child(2) .nav-dropdown {
  left: auto;
  right: 0;
  transform: translateY(6px);
}
.ssp-nav .nav-node:last-child:hover .nav-dropdown,
.ssp-nav .nav-node:last-child:focus-within .nav-dropdown,
.ssp-nav .nav-node:last-child.open .nav-dropdown,
.ssp-nav .nav-node:nth-last-child(2):hover .nav-dropdown,
.ssp-nav .nav-node:nth-last-child(2):focus-within .nav-dropdown,
.ssp-nav .nav-node:nth-last-child(2).open .nav-dropdown {
  transform: translateY(0);
}
.dropdown-link {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 850;
  line-height: 1.15;
}
.dropdown-link:hover,
.dropdown-link.active { background: var(--sail-green-soft); color: #0b2111; text-decoration: none; }
.dropdown-link.active { box-shadow: inset 3px 0 0 var(--sail-green); }

.ssp-userbar { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; white-space: nowrap; }
.user-chip,
.org-chip {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(35, 107, 49, .16);
  background: rgba(236, 255, 231, .72);
  color: #173a20;
  font-size: .86rem;
  font-weight: 900;
}
.user-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--sail-green-dark); box-shadow: 0 0 0 4px rgba(122, 217, 87, .20); flex: 0 0 auto; }
.user-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.org-switch { margin: 0; display: inline-flex; align-items: center; min-width: 175px; }
.org-switch select,
.ssp-userbar select {
  height: 38px;
  width: 100%;
  max-width: 245px;
  padding: 0 36px 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: white;
  color: var(--ink);
  font-size: .9rem;
  font-weight: 800;
  box-shadow: 0 5px 14px rgba(16, 32, 22, .04);
}

/* Typography and layout */
h1, h2, h3 { line-height: 1.08; color: var(--ink); letter-spacing: -.035em; margin: .2rem 0 .75rem; }
h1 { font-size: clamp(2.05rem, 4.2vw, 4rem); }
h2 { font-size: clamp(1.45rem, 2.3vw, 2.15rem); }
h3 { font-size: 1.18rem; }
p { margin-top: 0; }
.lead { color: #334238; font-size: clamp(1rem, 1.25vw, 1.16rem); max-width: 820px; }
.strong-lead { font-weight: 650; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.text-right { text-align: right; }

.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.admin-grid.wide-left { grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr); }
.file-manager-grid { grid-template-columns: minmax(300px, .75fr) minmax(0, 1.25fr); }

.card {
  position: relative;
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-soft);
  margin: 0 0 16px;
  overflow: hidden;
}
.card.soft { box-shadow: none; background: rgba(255, 255, 255, .76); }
.card.flush { padding: 0; }
.card.compact { padding: 16px; }

.section-heading { margin: 24px 0 14px; }
.section-heading p { margin: 0; color: var(--muted); max-width: 820px; font-weight: 650; }
.kpi { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.kpi strong { font-size: clamp(2rem, 3.8vw, 3.1rem); display: block; line-height: 1; color: var(--sail-green-deep); letter-spacing: -.06em; }
.kpi .muted { font-weight: 850; color: #435248; }
.metric-grid { margin-bottom: 22px; }
.metric-grid .kpi { min-height: 112px; }

/* Dashboard */
.dashboard-shell { display: grid; gap: 18px; }
.dashboard-hero,
.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(290px, .75fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}
.hero-copy,
.privacy-card,
.page-hero-main,
.page-hero-side {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow);
  padding: 28px;
  overflow: hidden;
}
.page-hero-main { position: relative; }
.page-hero-main::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -130px;
  width: 300px;
  height: 300px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(122, 217, 87, .22), transparent 68%);
  pointer-events: none;
}
.privacy-card,
.page-hero-side.dark {
  background: linear-gradient(145deg, #123f1d, #1f5e2e);
  color: white;
}
.privacy-card h2,
.privacy-card p,
.page-hero-side.dark h2,
.page-hero-side.dark p { color: white; }
.privacy-card p,
.page-hero-side.dark p { font-weight: 650; opacity: .94; }
.privacy-icon { width: 46px; height: 46px; border-radius: 16px; background: var(--sail-green); color: #102715; display: grid; place-items: center; font-weight: 950; font-size: 1.3rem; box-shadow: 0 12px 26px rgba(0, 0, 0, .20); margin-bottom: 14px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.dashboard-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 18px; align-items: start; }
.quick-action-list,
.queue-list,
.activity-list { display: grid; gap: 10px; }
.quick-action,
.queue-item,
.activity-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 14px;
  color: var(--ink);
  text-decoration: none;
}
.quick-action:hover,
.queue-item:hover,
.activity-item:hover { text-decoration: none; background: var(--mist); border-color: rgba(35, 107, 49, .22); }
.quick-action strong,
.queue-item strong,
.activity-item strong { display: block; color: var(--ink); }
.quick-action span,
.queue-item span,
.activity-item span { color: var(--muted); font-size: .9rem; font-weight: 650; }
.item-meta { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; margin-top: 5px; }
.item-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.empty-state { border: 1px dashed rgba(35, 107, 49, .24); border-radius: 16px; background: var(--mist); padding: 18px; color: var(--muted); font-weight: 700; }

.eyebrow { display: inline-flex; align-items: center; gap: 9px; padding: 7px 12px; border: 1px solid rgba(47, 143, 61, .22); border-radius: 999px; background: rgba(255, 255, 255, .82); color: #245f2e; font-weight: 900; font-size: .82rem; box-shadow: 0 10px 28px rgba(47, 143, 61, .06); }
.eyebrow-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--sail-green); box-shadow: 0 0 0 5px rgba(122, 217, 87, .16); }
.step-card { display: flex; flex-direction: column; min-height: 230px; }
.step-card p { color: var(--muted); font-weight: 650; }
.step-card .btn { margin-top: auto; align-self: flex-start; }
.step-number { width: 48px; height: 48px; border-radius: 16px; background: var(--sail-green-soft); border: 1px solid rgba(35, 107, 49, .18); display: grid; place-items: center; color: var(--sail-green-dark); font-weight: 950; margin-bottom: 12px; }

/* Controls */
.badge,
.status-chip,
.rating-chip,
.plan-chip,
.obs-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 5px 10px;
  border: 1px solid rgba(35, 107, 49, .18);
  background: var(--sail-green-soft);
  color: #174b22;
  font-size: .8rem;
  font-weight: 950;
  line-height: 1.2;
}
.badge.ok,
.status-chip.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn,
.status-chip.warn,
.rating-chip.warn,
.plan-chip.warn { background: var(--warn-bg); border-color: #fed7aa; color: #7c2d12; }
.badge.danger,
.status-chip.danger,
.rating-chip.danger,
.plan-chip.danger,
.obs-pill.danger { background: var(--danger-bg); border-color: #fecdd3; color: #881337; }
.actions { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.actions.spread { justify-content: space-between; }
.inline-form { margin: 0; }
.btn,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #184d24;
  color: white;
  padding: 11px 16px;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
  box-shadow: 0 10px 22px rgba(24, 77, 36, .14);
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}
.btn:hover,
button:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 14px 28px rgba(24, 77, 36, .18); }
.btn.primary { color: #102715; background: var(--sail-green); box-shadow: 0 14px 30px rgba(47, 143, 61, .20); }
.btn.secondary { background: white; color: var(--ink); border-color: var(--line-strong); box-shadow: 0 8px 18px rgba(17, 42, 22, .06); }
.btn.good,
.quick-export { background: var(--ok) !important; color: white !important; }
.btn.warn { background: var(--warn); color: white; }
.btn.danger { background: var(--danger); color: white; }
.btn.ghost { background: transparent; color: var(--sail-green-dark); border-color: rgba(35, 107, 49, .22); box-shadow: none; }
.btn.compact { min-height: 38px; padding: 8px 12px; font-size: .88rem; }
.notice { border: 1px solid rgba(35, 107, 49, .22); border-left: 5px solid var(--sail-green-dark); background: var(--info-bg); padding: 14px 16px; border-radius: var(--radius-sm); margin: 14px 0; color: #183b21; font-weight: 650; }
.notice.warn { border-left-color: var(--warn); background: var(--warn-bg); color: #5d3300; }
.notice.danger { border-left-color: var(--danger); background: var(--danger-bg); color: #6f0f29; }
.danger-text { color: var(--danger); font-weight: 850; }
.hint { color: var(--muted); font-size: .9rem; margin-top: 5px; font-weight: 650; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: #eff6ed; border: 1px solid rgba(35, 107, 49, .14); color: #123f1d; padding: 4px 8px; border-radius: 9px; font-weight: 850; }

/* Forms and tables */
form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label { display: block; font-weight: 900; color: var(--ink); margin: 12px 0 6px; }
input,
select,
textarea { width: 100%; padding: 11px 12px; border: 1px solid rgba(20, 33, 25, .26); border-radius: 13px; background: white; color: var(--ink); font-weight: 650; box-shadow: 0 5px 14px rgba(17, 42, 22, .03); }
input::placeholder,
textarea::placeholder { color: #728076; }
textarea { min-height: 118px; resize: vertical; }
.checkline { display: flex; align-items: center; gap: 8px; margin: 10px 0; font-weight: 750; }
.checkline input,
.checkbox-row input,
input[type="checkbox"],
input[type="radio"] { width: auto; box-shadow: none; }
.checkbox-row { align-items: center; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: var(--shadow-soft); }
table { width: 100%; border-collapse: collapse; background: white; }
th,
td { padding: 12px 13px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
th { background: #eff8eb; color: #203327; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
td { color: #1e2f24; font-weight: 600; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfff8; }
td.actions { margin-top: 0; }
.print-block { white-space: pre-wrap; background: #fbfff8; border: 1px solid var(--line); border-radius: 16px; padding: 15px; color: #1d2e23; font-weight: 600; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7); }

/* Login */
.login-page { min-height: 100vh; background: radial-gradient(circle at 20% 20%, rgba(122, 217, 87, .22), transparent 30rem), linear-gradient(135deg, #fbfff8 0%, #f1f7ed 48%, #ffffff 100%); }
.login-stage { width: min(1120px, calc(100% - 32px)); min-height: 100vh; margin: 0 auto; display: grid; grid-template-columns: 1.05fr .95fr; gap: 24px; align-items: center; padding: 42px 0; }
.login-brand-panel,
.login-card { border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); background: rgba(255, 255, 255, .9); padding: 30px; }
.login-brand-panel { position: relative; overflow: hidden; min-height: 480px; display: flex; flex-direction: column; justify-content: center; }
.login-brand-panel::after { content: ""; position: absolute; inset: auto -140px -180px auto; width: 420px; height: 420px; border-radius: 999px; background: radial-gradient(circle, rgba(122, 217, 87, .28), transparent 68%); pointer-events: none; }
.login-brand-top { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; position: relative; z-index: 1; }
.login-logo { width: 96px; height: 96px; object-fit: contain; border-radius: 28px; background: linear-gradient(145deg, rgba(122, 217, 87, .16), rgba(255, 255, 255, .96)); border: 1px solid rgba(122, 217, 87, .38); padding: 8px; box-shadow: 0 12px 28px rgba(47, 143, 61, .12); }
.login-brand-panel h1 { font-size: clamp(2.2rem, 4.6vw, 4.25rem); margin: 10px 0; }
.privacy-callout { margin-top: 26px; border-radius: var(--radius-md); background: #123f1d; color: white; padding: 18px; border: 1px solid rgba(255, 255, 255, .16); box-shadow: 0 18px 38px rgba(18, 63, 29, .20); position: relative; z-index: 1; }
.privacy-callout strong { display: block; color: white; font-size: 1.05rem; }
.privacy-callout span { display: block; color: rgba(255, 255, 255, .92); font-weight: 650; margin-top: 4px; }
.login-card h2 { font-size: clamp(1.9rem, 3.5vw, 3.05rem); margin: 12px 0 6px; }
.login-card .muted { font-weight: 650; margin-bottom: 20px; }

/* Reusable page-specific patterns */
.plan-submetrics,
.participant-summary,
.wv-article-meta { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 6px; }
.plan-submetrics span,
.participant-summary span,
.wv-article-meta span { display: inline-flex; align-items: center; border-radius: 999px; background: #f7fff5; border: 1px solid #dbe7dc; color: #405046; font-size: .78rem; font-weight: 850; padding: 4px 8px; }
.participant-summary .warn { background: #fff8e7; border-color: #f7d88f; color: #7c4a00; }
.participant-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.participant-code-cell .code { font-size: .92rem; }
.obs-note,
.obs-note-small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.obs-note { max-width: 360px; }
.obs-note-small { max-width: 260px; }

.obs-metrics,
.progress-metrics,
.plan-progress-grid { display: grid; gap: 14px; margin-top: 18px; }
.obs-metrics,
.progress-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.plan-progress-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.obs-metric,
.progress-metric,
.plan-progress-metric { border: 1px solid #dbe7dc; background: #fff; border-radius: 18px; padding: 15px; box-shadow: 0 9px 22px rgba(16, 32, 22, .05); }
.obs-metric strong,
.progress-metric strong,
.plan-progress-metric strong { display: block; color: #102016; font-size: 1.55rem; line-height: 1; }
.obs-metric span,
.progress-metric span,
.plan-progress-metric span { display: block; color: #405046; font-weight: 850; font-size: .82rem; margin-top: 6px; }
.obs-filter-grid { display: grid; grid-template-columns: 1.1fr 1.1fr .8fr .8fr auto; gap: 12px; align-items: end; }
.progress-filter-grid { display: grid; grid-template-columns: 1.1fr 1.1fr .8fr .8fr; gap: 12px; align-items: end; }
.obs-form-grid,
.review-grid { display: grid; gap: 14px; }
.obs-form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.obs-form-grid.two,
.review-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.obs-form-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.review-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.obs-callout,
.review-callout { border: 1px solid #b9efad; background: #f4fff1; border-radius: 18px; padding: 14px; color: #102016; font-weight: 800; }
.obs-measure-box,
.review-option-help { border: 1px solid #dbe7dc; background: #fff; border-radius: 18px; padding: 15px; margin-top: 14px; }
.progress-plan-card,
.plan-review-card { border: 1px solid #dbe7dc; border-radius: 20px; background: #fff; padding: 15px; margin-bottom: 14px; box-shadow: 0 10px 24px rgba(16, 32, 22, .06); }
.progress-plan-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.progress-mini-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.progress-mini { border-radius: 15px; background: #f8fbf8; border: 1px solid #e3eee5; padding: 12px; }
.progress-mini span { display: block; color: #405046; font-size: .78rem; font-weight: 900; }
.progress-mini strong { display: block; color: #102016; font-size: 1.05rem; margin-top: 4px; }

.doc-export-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 18px; }
.doc-option-card { background: #f9fff7; border: 1px solid #cdeec6; border-radius: 16px; padding: 14px; }
.doc-option-card strong { display: block; color: #102016; margin-bottom: 4px; }
.doc-plan-list { min-height: 210px; }
.doc-mini { font-size: .86rem; color: #405046; }
.doc-check-grid,
.doc-format { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.doc-check,
.doc-format label { display: flex; gap: 10px; align-items: flex-start; background: #fff; border: 1px solid #dbe7dc; border-radius: 14px; padding: 12px; }
.doc-check input,
.doc-format input { width: auto; margin-top: 4px; }
.doc-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.doc-export-note { border-left: 5px solid #62d84e; background: #f2fff0; border-radius: 12px; padding: 14px; color: #102016; }

/* Knowledge library */
.wv-hero { background: linear-gradient(135deg, #ffffff 0%, #f4fff1 72%, #e6fbdf 100%); border: 1px solid #dbe7dc; border-radius: 26px; padding: 22px; box-shadow: var(--shadow-soft); margin-bottom: 18px; }
.wv-hero h1 { margin: 0; color: #102016; }
.wv-hero p { max-width: 980px; }
.wv-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.wv-search-grid { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 10px; align-items: end; }
.wv-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.wv-article-card { border: 1px solid #dbe7dc; border-radius: 20px; background: #fff; padding: 16px; box-shadow: 0 10px 24px rgba(16, 32, 22, .06); margin-bottom: 12px; }
.wv-article-card h3 { margin: 0 0 6px; color: #102016; }
.wv-article-card-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.wv-body { border: 1px solid #dbe7dc; border-radius: 20px; background: #fff; padding: 20px; line-height: 1.6; color: #102016; }
.wv-body h2,
.wv-body h3 { color: #102016; }
.wv-callout { border: 1px solid #b9efad; background: #f0ffed; color: #102016; border-radius: 18px; padding: 14px; margin: 14px 0; }
.wv-callout.good { background: #edfdf3; border-color: #9ee8bc; }
.wv-callout.warn { background: #fff7ed; border-color: #fed7aa; }
.wv-admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.wv-link-list { display: grid; gap: 10px; }
.wv-attached-source { font-size: .8rem; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; color: #405046; }
textarea.wv-rich-editor { min-height: 380px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
.wv-snippets { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.wv-snippets button { font-size: .82rem; padding: 8px 10px; }
.wv-article-card .actions { margin-top: 12px; }


.wv-feedback-card { margin-top: 18px; }
.wv-feedback-form { margin-top: 14px; }
.feedback-context {
  display: grid;
  gap: 3px;
  border: 1px solid #cdeec6;
  border-radius: 18px;
  background: #f5fff2;
  padding: 14px 16px;
  margin: 14px 0;
}
.feedback-context span {
  color: #405046;
  font-size: .78rem;
  font-weight: 950;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.feedback-context strong { color: #102016; }
.feedback-context small { color: #53645a; font-weight: 750; }
.rating-options {
  border: 0;
  padding: 0;
  margin: 0 0 14px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.rating-options legend {
  grid-column: 1 / -1;
  margin-bottom: 2px;
  color: #102016;
  font-weight: 900;
}
.rating-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid #dbe7dc;
  border-radius: 16px;
  background: #fff;
  padding: 12px;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease, transform .16s ease;
}
.rating-option:hover,
.rating-option:has(input:checked) {
  border-color: rgba(35, 107, 49, .38);
  background: #f7fff5;
  box-shadow: 0 8px 18px rgba(16, 32, 22, .07);
}
.rating-option:has(input:checked) { transform: translateY(-1px); }
.rating-option input { width: auto; margin-top: 3px; }
.rating-option strong { display: block; color: #102016; line-height: 1.1; }
.rating-option small { display: block; color: #53645a; font-size: .78rem; margin-top: 4px; font-weight: 750; }

/* Navigation manager */
.file-chip-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.file-chip { min-height: 56px; border-radius: 16px; background: #fbfff8; color: #142119; border: 1px solid var(--line); box-shadow: none; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; text-align: left; padding: 10px 12px; }
.file-chip code { white-space: normal; word-break: break-word; }
.file-chip span { color: var(--muted); font-size: .84rem; }
.nav-admin-list { display: grid; gap: 9px; margin-top: 14px; }
.nav-admin-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid var(--line); border-radius: 16px; background: #fbfff8; padding: 12px 14px; }
.nav-admin-row.level-1 { margin-left: 22px; background: #ffffff; }
.nav-admin-row.level-2 { margin-left: 44px; }
.nav-admin-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.file-filter { display: flex; gap: 8px; margin: 12px 0; }
.file-list { display: grid; gap: 7px; max-height: 70vh; overflow: auto; padding-right: 4px; }
.file-list-row { display: grid; gap: 3px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: #142119; padding: 10px 12px; text-decoration: none; }
.file-list-row:hover,
.file-list-row.active { background: var(--sail-green-soft); border-color: rgba(35, 107, 49, .28); text-decoration: none; }
.file-list-row code { white-space: normal; word-break: break-word; }
.file-list-row span { font-size: .82rem; color: var(--muted); font-weight: 750; }
.code-editor { min-height: 62vh; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92rem; line-height: 1.45; white-space: pre; overflow: auto; }
.file-editor-form .row { grid-template-columns: 1fr 1fr; }

/* Utility spacing and alignment */
.mt-12 { margin-top: 12px !important; }
.mt-14 { margin-top: 14px !important; }
.mt-18 { margin-top: 18px !important; }
.mb-14 { margin-bottom: 14px !important; }
.align-end { align-self: end; }
.textarea-short { min-height: 90px; }

@media (max-width: 1180px) {
  .top-inner { grid-template-columns: auto 1fr; gap: 10px; padding: 8px 0; }
  .ssp-nav { grid-column: 1 / -1; order: 3; justify-content: flex-start; flex-wrap: wrap; row-gap: 6px; overflow: visible; padding: 2px 0 4px; }
  .ssp-userbar { justify-self: end; }
  .brand-cluster { min-width: 190px; }
  .admin-grid.wide-left,
  .file-manager-grid,
  .dashboard-layout { grid-template-columns: 1fr; }
}

@media (max-width: 1040px) {
  .dashboard-hero,
  .page-hero,
  .login-stage { grid-template-columns: 1fr; }
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.cols-3,
  .grid.cols-2 { grid-template-columns: 1fr; }
  .login-brand-panel { min-height: auto; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
  .footer-note { text-align: left; }
  .obs-metrics,
  .progress-metrics,
  .progress-mini-grid,
  .plan-progress-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .obs-filter-grid,
  .progress-filter-grid { grid-template-columns: 1fr 1fr; }
  .wv-card-grid,
  .wv-admin-grid,
  .wv-search-grid,
  .rating-options { grid-template-columns: 1fr; }
  .wv-article-card-head { display: block; }
}

@media (max-width: 760px) {
  .top-inner { width: min(100% - 20px, 1440px); grid-template-columns: 1fr; min-height: auto; }
  .brand-cluster,
  .ssp-userbar,
  .ssp-nav { width: 100%; }
  .ssp-nav { overflow: visible; }
  .nav-node { display: grid; }
  .nav-dropdown {
    position: static;
    left: auto;
    right: auto;
    transform: none;
    display: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    min-width: 0;
    max-width: none;
    max-height: none;
    box-shadow: none;
    margin-top: 6px;
  }
  .nav-dropdown::before,
  .nav-node.has-children::after { display: none; }
  .nav-node:hover .nav-dropdown,
  .nav-node:focus-within .nav-dropdown,
  .nav-node.open .nav-dropdown { display: grid; transform: none; }
  .ssp-userbar { justify-content: flex-start; flex-wrap: wrap; }
  .org-switch { flex: 1 1 100%; min-width: 0; }
  .org-switch select { max-width: 100%; }
  .ssp-main { width: min(100% - 22px, var(--max)); margin-top: 18px; }
  .hero-copy,
  .privacy-card,
  .page-hero-main,
  .page-hero-side,
  .login-brand-panel,
  .login-card { padding: 22px; border-radius: 24px; }
  form .row,
  .obs-form-grid,
  .obs-form-grid.two,
  .obs-form-grid.four,
  .review-grid,
  .review-grid.two,
  .doc-export-grid,
  .doc-check-grid,
  .doc-format { grid-template-columns: 1fr; }
  .actions.spread { align-items: stretch; flex-direction: column; }
  .actions.spread .btn,
  .actions.spread button { width: 100%; }
  .login-brand-top { align-items: flex-start; flex-direction: column; }
  .login-logo { width: 86px; height: 86px; }
  .quick-action,
  .queue-item,
  .activity-item,
  .kpi,
  .progress-plan-head,
  .nav-admin-row { align-items: flex-start; flex-direction: column; }
  .item-actions,
  .nav-admin-meta { justify-content: flex-start; }
  .nav-admin-row.level-1,
  .nav-admin-row.level-2 { margin-left: 0; }
  .file-filter { flex-direction: column; }
  .file-editor-form .row { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .ssp-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ssp-nav .nav-link,
  .ssp-nav > a { width: 100%; }
  .ssp-userbar { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .user-chip { justify-content: center; }
  .grid.cols-4,
  .obs-metrics,
  .progress-metrics,
  .progress-mini-grid,
  .plan-progress-grid,
  .obs-filter-grid,
  .progress-filter-grid { grid-template-columns: 1fr; }
  th, td { padding: 10px 11px; }
  .table-wrap { border-radius: 14px; }
  .obs-note { max-width: 220px; }
}

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

/* Reports and feedback workbench */
.reports-hero .page-hero-main { display: grid; gap: 12px; }
.report-filter-card {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  margin-top: 10px;
  padding: 14px;
  border: 1px solid rgba(35, 107, 49, .18);
  border-radius: 20px;
  background: rgba(255, 255, 255, .72);
}
.feedback-filter-card { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.report-filter-card label { margin-top: 0; }
.reports-metrics .card { margin-bottom: 0; }
.reports-top-grid,
.reports-bottom-grid { align-items: start; }
.report-mini-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.report-mini-metrics div {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfff8;
  padding: 14px;
}
.report-mini-metrics strong { display: block; font-size: 1.8rem; line-height: 1; color: var(--sail-green-deep); letter-spacing: -.04em; }
.report-mini-metrics span { color: var(--muted); font-size: .86rem; font-weight: 850; }
.report-list { display: grid; gap: 9px; }
.report-list-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  color: var(--ink);
  padding: 12px 14px;
  text-decoration: none;
}
.report-list-row:hover { background: var(--mist); border-color: rgba(35, 107, 49, .24); text-decoration: none; }
.report-list-row strong { display: block; color: var(--ink); }
.report-list-row small { display: block; color: var(--muted); font-weight: 750; margin-top: 3px; }
.report-trend-list { display: grid; gap: 12px; }
.trend-row {
  display: grid;
  grid-template-columns: minmax(120px, .45fr) minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  padding: 12px;
}
.trend-row strong { display: block; color: var(--ink); }
.trend-row span { color: var(--muted); font-size: .86rem; font-weight: 750; }
.trend-bar {
  height: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf5ea;
  border: 1px solid rgba(35, 107, 49, .15);
}
.trend-bar span { display: block; height: 100%; background: linear-gradient(90deg, #b8f0aa, #7ad957); border-radius: inherit; }
.feedback-workbench-list { display: grid; gap: 14px; }
.feedback-workbench-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 10px 24px rgba(16, 32, 22, .06);
}
.feedback-card-title-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}
.feedback-card-title-row h3 { margin: 0 0 6px; }
.compact-actions { margin-top: 0; }
.feedback-context-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.feedback-context-grid div {
  border: 1px solid #dbe7dc;
  border-radius: 14px;
  background: #fbfff8;
  padding: 10px 12px;
}
.feedback-context-grid span {
  display: block;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.feedback-context-grid strong {
  display: block;
  color: var(--ink);
  margin-top: 3px;
  word-break: break-word;
}
.feedback-comment {
  border: 1px solid #dbe7dc;
  border-radius: 16px;
  padding: 13px 14px;
  background: #fff;
}
.feedback-comment strong { display: block; margin-bottom: 5px; }
.feedback-comment p { margin: 0; color: var(--ink-2); font-weight: 650; }
.feedback-comment.empty p { color: var(--muted); }
.feedback-process-form {
  border: 1px solid #dbe7dc;
  border-radius: 18px;
  padding: 14px;
  background: #fbfff8;
  align-self: start;
}
.feedback-process-form .row { grid-template-columns: 1fr 1fr; }
.compact-feedback-list .activity-item { align-items: flex-start; }
.report-review-item { color: var(--ink); }
.notice.good { border-left-color: var(--ok); background: var(--ok-bg); color: var(--ok); }

@media (max-width: 1180px) {
  .report-filter-card,
  .feedback-filter-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feedback-workbench-card { grid-template-columns: 1fr; }
  .feedback-context-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .report-filter-card,
  .feedback-filter-card,
  .feedback-context-grid,
  .trend-row { grid-template-columns: 1fr; }
  .report-list-row,
  .feedback-card-title-row { align-items: flex-start; flex-direction: column; }
  .feedback-process-form .row { grid-template-columns: 1fr; }
}
.impact-filter-card { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.soft-report-note {
  margin: 0 0 24px;
  border-radius: 18px;
}
.table-wrap td .status-chip { white-space: nowrap; }

@media (max-width: 1180px) {
  .impact-filter-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

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