:root {
  --background: #f5f6f2;
  --surface: #ffffff;
  --surface-soft: #eef3ec;
  --ink: #192b25;
  --muted: #66766d;
  --line: #e1e7dd;
  --green: #175c48;
  --green-hover: #104936;
  --green-soft: #e7f2e7;
  --red: #a83f34;
  --red-soft: #fcefe9;
  --amber: #88611a;
  --amber-soft: #f9f1dc;
  --shadow: 0 1px 2px #14291c06, 0 8px 30px #14291c04;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--background);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums;
  line-height: 1.6;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
button, a, input, select { touch-action: manipulation; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: var(--green); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible { outline: 3px solid #ac8535; outline-offset: 4px; }
button, input, select { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
svg { vertical-align: middle; flex-shrink: 0; }
[hidden] { display: none !important; }
.sr-only { 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 { position: fixed; z-index: 100; top: -80px; left: 16px; padding: 12px 18px; background: var(--ink); color: white; border-radius: 0 0 10px 10px; }
.skip-link:focus { top: 0; }
.boot-screen { min-height: 80dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 32px; text-align: center; }
.boot-screen h1 { font-size: 25px; }
.boot-screen p, .noscript-message { color: var(--muted); }
.noscript-message { text-align: center; padding: 30px; }
.brand { display: flex; gap: 12px; align-items: center; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 46px; flex-shrink: 0; border-radius: 13px; background: var(--green); color: white; font-size: 21px; font-weight: 600; }
.brand-name { font-size: 21px; font-weight: 750; line-height: 1.1; letter-spacing: -.5px; }
.brand-name small { display: block; font-size: 11px; letter-spacing: 2px; color: var(--muted); margin-top: 7px; font-weight: 500; }
.muted { color: var(--muted); }
.subtle { font-size: 12px; color: var(--muted); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 11px; padding: 11px 16px; min-height: 44px; font-size: 13px; font-weight: 600; line-height: 1.5; background: var(--green); color: white; transition: background-color 140ms, color 140ms, transform 120ms; text-decoration: none; }
.button:hover:not(:disabled) { background: var(--green-hover); }
.button:active:not(:disabled) { transform: scale(.96); }
.button.secondary { border-color: var(--line); color: var(--ink); background: var(--surface); }
.button.secondary:hover:not(:disabled) { background: var(--surface-soft); }
.button.ghost { background: transparent; color: var(--muted); }
.button.ghost:hover:not(:disabled) { background: var(--green-soft); color: var(--green); }
.button.full { width: 100%; }
.button.small { padding: 9px 13px; }
.button-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.icon-button { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface); }
.icon-button:hover { background: var(--surface-soft); }
.label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.input, .select { width: 100%; border: 1px solid var(--line); color: var(--ink); background: var(--surface); border-radius: 11px; min-height: 46px; padding: 10px 13px; font-size: 15px; }
.input::placeholder { color: #829087; }
.input:focus, .select:focus { border-color: var(--green); }
.field-help { display: block; font-size: 12px; color: var(--muted); margin-top: 8px; }
.field-error { font-size: 13px; color: var(--red); margin-top: 12px; }
.pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 6px; padding: 3px 8px; font-size: 11px; font-weight: 550; background: var(--surface-soft); color: var(--muted); white-space: nowrap; }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.amber { background: var(--amber-soft); color: var(--amber); }
.status-dot { display: inline-block; height: 6px; width: 6px; border-radius: 50%; background: currentColor; }

/* Authentication */
.login-layout { min-height: 100dvh; display: grid; grid-template-columns: minmax(340px, .92fr) minmax(440px, 1.08fr); }
.login-story { padding: 55px clamp(32px, 6vw, 96px); color: #eff6eb; background: #204e3e; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; gap: 45px; }
.login-story .brand-mark { background: #eff6eb; color: var(--green); }
.login-story .brand-name small { color: #bbd0bb; }
.login-intro { max-width: 430px; position: relative; z-index: 1; }
.login-intro .eyebrow { color: #bbd0bb; }
.login-intro h1 { font-size: clamp(28px, 3.2vw, 43px); font-weight: 650; letter-spacing: -.7px; line-height: 1.5; margin: 19px 0; }
.login-intro p { font-size: 14px; line-height: 1.9; color: #cfdfcc; max-width: 350px; }
.login-principles { display: grid; gap: 17px; margin-top: 36px; }
.login-principles div { display: flex; align-items: center; gap: 11px; color: #d9e6d6; font-size: 13px; }
.login-foot { position: relative; font-size: 11px; color: #bbd0bb; z-index: 1; }
.login-story::after { content: ""; position: absolute; width: 400px; height: 400px; border: 1px solid #e3eddb13; border-radius: 50%; bottom: -230px; right: -100px; box-shadow: 0 0 0 40px #e3eddb04, 0 0 0 80px #e3eddb03; }
.login-main { min-width: 0; display: flex; align-items: center; justify-content: center; padding: 50px 40px; }
.login-form { width: 100%; max-width: 380px; }
.login-form .mobile-logo { display: none; }
.login-form h2 { font-size: 26px; letter-spacing: -.5px; margin-bottom: 10px; }
.login-form > p { font-size: 13px; color: var(--muted); margin-bottom: 28px; }
.password-row { position: relative; }
.password-row input { padding-right: 55px; }
.password-row .icon-button { position: absolute; right: 2px; top: 2px; border: 0; background: transparent; }
.login-form .button.full { margin-top: 23px; }
.login-security { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 19px; display: flex; gap: 9px; align-items: flex-start; font-size: 11px; line-height: 1.8; color: var(--muted); }

/* Shared application shell */
.app-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); max-width: 1600px; margin: auto; min-height: 100dvh; }
.sidebar { height: 100dvh; position: sticky; top: 0; padding: 32px 22px; display: flex; flex-direction: column; gap: 38px; border-right: 1px solid var(--line); }
.nav { display: grid; gap: 8px; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 48px; border: 0; background: transparent; color: var(--muted); padding: 12px 14px; border-radius: 12px; font-size: 14px; font-weight: 550; text-align: left; transition: background-color 140ms, color 140ms; }
.nav-item:hover { background: var(--surface-soft); color: var(--ink); }
.nav-item.active { background: var(--green-soft); color: var(--green); font-weight: 650; }
.sidebar-note { margin-top: auto; border-top: 1px solid var(--line); padding: 21px 7px 0; color: var(--muted); font-size: 11px; line-height: 1.9; }
.sidebar-note svg { margin-bottom: 8px; }
.workspace { min-width: 0; padding: 27px 40px 55px; max-width: 1350px; width: 100%; margin: auto; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 34px; min-height: 44px; }
.breadcrumb { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.breadcrumb strong { color: var(--ink); font-weight: 500; }
.topbar-right { display: flex; align-items: center; gap: 13px; }
.mobile-brand { display: none; }
.topbar .button { font-size: 12px; }
.eyebrow { text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); font-size: 10px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.page-header > div { min-width: 0; }
.page-header > .button { flex-shrink: 0; }
.page-header h1 { font-size: 29px; letter-spacing: -.7px; line-height: 1.4; margin-top: 8px; overflow-wrap: anywhere; }
.page-header p { font-size: 13px; color: var(--muted); margin-top: 9px; max-width: 650px; }
.surface { border: 1px solid var(--line); background: var(--surface); border-radius: 17px; box-shadow: var(--shadow); overflow: hidden; }
.pad { padding: 24px; }
.section-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 28px 0 15px; }
.section-header h2 { font-size: 17px; letter-spacing: -.2px; }
.section-header p { font-size: 12px; color: var(--muted); }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 22px 0; }
.metric { min-width: 0; padding: 24px; }
.metric + .metric { border-left: 1px solid var(--line); }
.metric-label { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.metric-value { font-size: 31px; line-height: 1.2; font-weight: 650; letter-spacing: -.6px; margin: 13px 0 9px; overflow-wrap: anywhere; }
.metric-value small { font-size: 11px; font-weight: 450; color: var(--muted); margin-left: 5px; letter-spacing: 0; }
.metric-description { color: var(--muted); font-size: 11px; line-height: 1.7; }
.two-column { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(290px, 1fr); gap: 22px; }
.card-title { font-size: 15px; font-weight: 650; }
.card-description { font-size: 11px; color: var(--muted); margin-top: 6px; }
.note { display: flex; align-items: flex-start; gap: 10px; padding: 14px 17px; border-radius: 12px; background: var(--green-soft); color: var(--green); font-size: 12px; line-height: 1.8; }
.note svg { margin-top: 3px; }
.note.neutral { background: var(--surface-soft); color: var(--muted); }
.note.error { color: var(--red); background: var(--red-soft); }
.error-panel { padding: 28px; margin-top: 20px; text-align: center; }
.error-panel h2 { font-size: 19px; margin: 15px 0 8px; }
.error-panel p { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.empty-state { text-align: center; padding: 52px 25px; color: var(--muted); }
.empty-state h2 { color: var(--ink); font-size: 18px; margin: 17px 0 9px; }
.empty-state p { font-size: 13px; max-width: 470px; margin: auto; }
.empty-state .button { margin-top: 21px; }
.loading-panel { display: flex; align-items: center; justify-content: center; min-height: 260px; padding: 32px; gap: 11px; color: var(--muted); font-size: 13px; }
.spinner { width: 17px; height: 17px; border: 2px solid var(--line); border-top-color: var(--green); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.refresh-caption { font-size: 11px; color: var(--muted); }
.environment-bar { display: flex; align-items: center; gap: 19px; margin-bottom: 29px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: #ffffff85; }
.environment-bar label { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.environment-bar .label { margin: 0; font-size: 11px; color: var(--muted); font-weight: 500; }
.environment-bar .select { width: auto; min-width: 125px; min-height: 44px; font-size: 12px; }
.environment-bar p { font-size: 11px; color: var(--muted); }
.privacy-gap { margin-top: 19px; }
.detail-back { margin: -7px 0 20px; }

/* Server-paginated people and result lists */
.list-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin: 24px 0 16px; }
.search-form { display: flex; align-items: flex-end; gap: 9px; flex: 1; max-width: 490px; }
.search-form label { flex: 1; min-width: 0; }
.search-form .label { font-size: 12px; color: var(--muted); margin-bottom: 7px; }
.search-form .input { font-size: 14px; }
.list-toolbar .select { width: auto; min-width: 110px; font-size: 12px; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13px; text-align: left; }
caption { text-align: left; }
th { font-size: 11px; color: var(--muted); font-weight: 550; background: #fafbf8; white-space: nowrap; padding: 14px 18px; border-bottom: 1px solid var(--line); }
td { padding: 17px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcf9; }
td.nowrap { white-space: nowrap; }
td.number { font-weight: 550; }
td .subtle { display: block; font-size: 10px; margin-top: 3px; }
.person { display: flex; align-items: center; gap: 10px; min-width: 165px; }
.avatar { height: 36px; width: 36px; border-radius: 11px; background: var(--surface-soft); display: grid; place-items: center; color: var(--green); font-size: 14px; font-weight: 600; flex-shrink: 0; }
.person strong { display: block; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.person small { display: block; font-size: 10px; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 16px 19px; border-top: 1px solid var(--line); }
.pagination p { font-size: 12px; color: var(--muted); }
.pagination .button-row { gap: 8px; }
.pagination .button { font-size: 12px; padding: 9px 12px; }
.pagination .page-index { font-size: 12px; color: var(--muted); padding: 0 7px; }
.user-heading { display: flex; align-items: center; gap: 15px; }
.user-heading > div { min-width: 0; }
.user-heading .avatar { height: 54px; width: 54px; border-radius: 17px; font-size: 20px; }
.user-heading h1 { margin-top: 0; }
.user-meta { display: flex; gap: 9px 18px; flex-wrap: wrap; margin-top: 7px; color: var(--muted); font-size: 12px; }
.user-meta span { display: inline-flex; align-items: center; gap: 6px; }
.subject-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-top: 16px; }
.subject-card { padding: 20px; }
.subject-name { font-size: 15px; font-weight: 650; margin-bottom: 15px; display: flex; gap: 10px; align-items: center; }
.subject-icon { display: grid; place-items: center; height: 33px; width: 33px; background: var(--surface-soft); color: var(--green); border-radius: 10px; font-family: Georgia, "PingFang SC", serif; font-size: 20px; }
.subject-total { display: flex; align-items: baseline; gap: 5px; margin-bottom: 10px; }
.subject-total strong { font-size: 26px; font-weight: 650; line-height: 1; }
.subject-total span { font-size: 11px; color: var(--muted); }
progress { display: block; width: 100%; height: 5px; border: 0; border-radius: 5px; background: var(--surface-soft); color: var(--green); appearance: none; overflow: hidden; }
progress::-webkit-progress-bar { background: var(--surface-soft); border-radius: 5px; }
progress::-webkit-progress-value { background: var(--green); border-radius: 5px; }
progress::-moz-progress-bar { background: var(--green); border-radius: 5px; }
.subject-detail { margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--line); display: grid; gap: 9px; }
.subject-detail div { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--muted); }
.subject-detail strong { color: var(--ink); font-weight: 600; }
.activity { width: 100%; margin-top: 18px; }
.activity svg { display: block; width: 100%; height: auto; max-height: 190px; }
.activity text { font-family: inherit; font-size: 11px; fill: var(--muted); }
.activity .bar { fill: #dfe9dd; }
.activity .bar.today { fill: var(--green); }
.activity .bar-count { fill: var(--ink); font-size: 11px; font-weight: 600; }
.activity .baseline { stroke: var(--line); stroke-width: 1; }
.activity-caption { margin-top: 12px; color: var(--muted); font-size: 11px; }
.summary-list { display: grid; margin: 18px 0 0; }
.summary-list div { display: flex; justify-content: space-between; gap: 15px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.summary-list div:last-child { border-bottom: 0; }
.summary-list dt { color: var(--muted); }
.summary-list dd { margin: 0; font-weight: 600; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
.filters label { min-width: 130px; }
.filters .label { font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.filters .select { font-size: 12px; min-height: 44px; }
.question-id { font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.page-foot { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 35px; display: flex; justify-content: space-between; gap: 16px; font-size: 10px; color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 80; max-width: min(90vw, 520px); padding: 12px 18px; border-radius: 12px; background: var(--ink); color: white; font-size: 13px; box-shadow: 0 5px 25px #10261820; }

@media (max-width: 1150px) {
  .app-layout { grid-template-columns: 190px minmax(0, 1fr); }
  .sidebar { padding: 28px 17px; }
  .workspace { padding: 25px 26px 45px; }
  .metric { padding: 21px 18px; }
  .metric-value { font-size: 28px; }
  .subject-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-column { grid-template-columns: 1fr 1fr; gap: 17px; }
  th, td { padding-left: 14px; padding-right: 14px; }
}
@media (max-width: 850px) {
  .login-layout { grid-template-columns: 1fr; }
  .login-story { display: none; }
  .login-main { min-height: 100dvh; padding: 40px 28px; }
  .login-form .mobile-logo { display: flex; margin-bottom: 45px; }
  .login-form h2 { font-size: 25px; }
  .app-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding: 15px 24px; border-right: 0; border-bottom: 1px solid var(--line); flex-direction: row; justify-content: space-between; gap: 20px; }
  .sidebar .brand-mark { width: 34px; height: 38px; font-size: 18px; border-radius: 10px; }
  .sidebar .brand-name { font-size: 18px; }
  .sidebar .brand-name small { font-size: 9px; margin-top: 5px; }
  .sidebar-note { display: none; }
  .nav { display: flex; align-items: center; gap: 7px; }
  .nav-item { min-height: 44px; padding: 10px 13px; font-size: 12px; gap: 7px; }
  .nav-item svg { width: 17px; height: 17px; }
  .workspace { padding: 23px 24px 40px; }
  .topbar { margin-bottom: 24px; }
  .topbar .pill { font-size: 10px; }
  .page-header h1 { font-size: 27px; }
  .page-header p { font-size: 12px; }
}
@media (max-width: 600px) {
  .workspace { padding: 20px 16px 35px; }
  .environment-bar { flex-direction: column; align-items: stretch; gap: 9px; padding: 11px 13px; margin-bottom: 23px; }
  .environment-bar label { justify-content: space-between; }
  .environment-bar p { font-size: 10px; }
  .sidebar { padding: 14px 16px; gap: 10px; }
  .sidebar .brand { gap: 9px; }
  .sidebar .brand-name small { display: none; }
  .sidebar .brand-name { font-size: 17px; }
  .nav-item { padding: 9px 10px; font-size: 12px; }
  .nav-item svg { display: none; }
  .topbar { gap: 9px; margin-bottom: 23px; }
  .breadcrumb { font-size: 10px; gap: 6px; }
  .topbar-right { gap: 7px; }
  .topbar-right .pill { display: none; }
  .topbar-right .button { padding: 9px 11px; font-size: 11px; }
  .page-header { align-items: flex-start; gap: 13px; margin-bottom: 19px; }
  .page-header h1 { font-size: 24px; }
  .page-header > .button { padding: 9px 11px; font-size: 11px; }
  .page-header > .button svg { display: none; }
  .eyebrow { font-size: 9px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 18px; }
  .metric { padding: 19px 17px; }
  .metric:nth-child(3) { border-left: 0; }
  .metric:nth-child(n+3) { border-top: 1px solid var(--line); }
  .metric-value { font-size: 27px; margin-top: 11px; }
  .metric-label { font-size: 11px; }
  .metric-description { font-size: 10px; }
  .two-column { grid-template-columns: 1fr; }
  .pad { padding: 20px; }
  .subject-grid { gap: 11px; }
  .subject-card { padding: 17px 14px; }
  .subject-name { font-size: 13px; gap: 8px; }
  .subject-icon { width: 29px; height: 29px; border-radius: 8px; font-size: 17px; }
  .subject-total strong { font-size: 24px; }
  .subject-total span { font-size: 10px; }
  .subject-detail div { font-size: 10px; }
  .section-header { margin-top: 25px; }
  .section-header h2 { font-size: 16px; }
  .section-header p { font-size: 10px; }
  .list-toolbar { flex-wrap: wrap; gap: 13px; }
  .search-form { max-width: none; flex-basis: 100%; }
  .search-form .input { font-size: 16px; }
  .list-toolbar > label { display: flex; align-items: center; gap: 9px; }
  .pagination { padding: 13px; gap: 10px; flex-wrap: wrap; }
  .pagination p { font-size: 10px; }
  .pagination .button { font-size: 11px; padding: 8px 10px; }
  .pagination .page-index { font-size: 11px; padding: 0 3px; }
  .user-heading { gap: 11px; align-items: flex-start; }
  .user-heading .avatar { width: 43px; height: 45px; font-size: 17px; border-radius: 13px; }
  .user-meta { font-size: 10px; gap: 5px 12px; }
  .note { font-size: 11px; padding: 12px 14px; }
  .filters { gap: 10px; }
  .filters label { flex: 1; min-width: 110px; }
  .page-foot { flex-direction: column; gap: 7px; }
}
@media (max-width: 360px) {
  .workspace { padding-left: 12px; padding-right: 12px; }
  .sidebar { padding-left: 12px; padding-right: 12px; }
  .sidebar .brand-name { font-size: 15px; }
  .nav-item { padding: 9px 8px; font-size: 11px; }
  .page-header h1 { font-size: 22px; }
  .metric { padding: 16px 13px; }
  .subject-card { padding: 15px 12px; }
  .subject-detail div { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .button:active:not(:disabled) { transform: none; }
}
