:root {
  color-scheme: light;
  --brand-950: #24113f;
  --brand-900: #33175b;
  --brand-800: #46217c;
  --brand-700: #5529a0;
  --brand-600: #6436c8;
  --brand-500: #7a4ee0;
  --brand-100: #eee7ff;
  --brand-50: #f7f4ff;
  --orange-600: #c9470b;
  --orange-500: #ff7330;
  --orange-100: #ffeadf;
  --mint-700: #087866;
  --mint-500: #20b99a;
  --mint-100: #dff8f1;
  --yellow-500: #f6bd3b;
  --yellow-100: #fff4c7;
  --coral-500: #f05c72;
  --coral-100: #ffe5ea;
  --ink-950: #18131f;
  --ink-800: #332b3c;
  --ink-700: #4d4457;
  --ink-600: #62596d;
  --ink-500: #7b7285;
  --surface: #ffffff;
  --canvas: #f5f3f8;
  --line: #ddd7e5;
  --line-strong: #c8bfd4;
  --success-700: #16714a;
  --success-100: #ddf7ea;
  --warning-800: #7c4a03;
  --warning-100: #fff3d4;
  --danger-700: #ad2b2b;
  --danger-100: #fee7e7;
  --shadow-small: 0 6px 18px rgb(38 22 58 / 8%);
  --shadow-large: 0 20px 60px rgb(38 22 58 / 14%);
  --radius-small: 10px;
  --radius-medium: 16px;
  --radius-large: 24px;
  --focus: 0 0 0 3px rgb(100 54 200 / 24%);
  font-family:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans SC",
    sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--canvas);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink-950);
  background:
    radial-gradient(circle at 9% 8%, rgb(122 78 224 / 12%), transparent 26rem),
    radial-gradient(circle at 92% 18%, rgb(32 185 154 / 10%), transparent 22rem),
    radial-gradient(circle at 72% 92%, rgb(246 189 59 / 10%), transparent 22rem),
    var(--canvas);
  font-size: 1rem;
  line-height: 1.55;
}

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

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.is-hidden {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  color: #fff;
  background: var(--brand-900);
  border-radius: 8px;
  transform: translateY(-160%);
}

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

.app-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 74px;
  padding: 0.7rem clamp(1rem, 4vw, 3rem);
  background: rgb(255 255 255 / 92%);
  border-bottom: 1px solid rgb(221 215 229 / 80%);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  gap: 0.75rem;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #fff;
  background: var(--brand-600);
  border-radius: 13px;
  box-shadow: 0 8px 18px rgb(100 54 200 / 28%);
}

.brand-mark svg {
  width: 30px;
  fill: #fff;
  stroke: #fff;
  stroke-width: 2.5px;
  stroke-linecap: round;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1.02rem;
  line-height: 1.15;
  letter-spacing: 0.01em;
}

.brand small {
  margin-top: 0.22rem;
  color: var(--ink-600);
  font-size: 0.75rem;
}

.main-nav {
  display: flex;
  gap: 0.25rem;
  justify-self: center;
  padding: 0.25rem;
  background: #f0edf4;
  border-radius: 12px;
}

.nav-button {
  position: relative;
  min-height: 40px;
  padding: 0.55rem 0.9rem;
  color: var(--ink-600);
  background: transparent;
  border: 0;
  border-radius: 9px;
  font-size: 0.88rem;
  font-weight: 650;
  transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.nav-button:hover {
  color: var(--brand-800);
}

.nav-button.is-active {
  color: var(--brand-800);
  background: #fff;
  box-shadow: 0 2px 8px rgb(46 26 75 / 10%);
}

.nav-badge {
  display: inline-grid;
  min-width: 20px;
  min-height: 20px;
  margin-left: 0.3rem;
  padding: 0 0.3rem;
  place-items: center;
  color: #fff;
  background: var(--orange-600);
  border-radius: 999px;
  font-size: 0.72rem;
}

.nav-badge-mint {
  background: var(--mint-700);
}

.account-area {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  justify-self: end;
}

.account-name {
  max-width: 8rem;
  overflow: hidden;
  font-size: 0.9rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

main {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: clamp(1.25rem, 3vw, 2.5rem) clamp(1rem, 4vw, 3rem) 4rem;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.72fr);
  gap: clamp(2rem, 7vw, 7rem);
  align-items: center;
  min-height: calc(100vh - 150px);
  max-width: 1120px;
  margin: 0 auto;
}

.auth-intro {
  max-width: 640px;
}

.eyebrow {
  margin: 0 0 0.55rem;
  color: var(--brand-600);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.auth-intro h1,
.page-heading h1 {
  margin: 0;
  color: var(--brand-950);
  line-height: 1.12;
}

.auth-intro h1 {
  max-width: 12em;
  font-size: clamp(2.45rem, 5.5vw, 4.8rem);
  letter-spacing: -0.055em;
}

.auth-intro > p:not(.eyebrow) {
  max-width: 38rem;
  margin: 1.5rem 0 0;
  color: var(--ink-600);
  font-size: clamp(1rem, 1.7vw, 1.15rem);
}

.auth-steps {
  display: grid;
  gap: 0.85rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.auth-steps li {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  color: var(--ink-800);
  font-weight: 600;
}

.auth-steps span {
  display: grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--brand-700);
  background: var(--brand-100);
  border-radius: 9px;
  font-size: 0.82rem;
}

.auth-card,
.request-panel,
.result-panel,
.list-surface,
.profile-form {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-small);
}

.auth-card {
  padding: clamp(1.2rem, 3vw, 2rem);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-large);
}

.segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem;
  margin-bottom: 1.5rem;
  padding: 0.3rem;
  background: #f0edf4;
  border-radius: 12px;
}

.segment {
  min-height: 42px;
  color: var(--ink-600);
  background: transparent;
  border: 0;
  border-radius: 9px;
  font-weight: 700;
}

.segment.is-active {
  color: var(--brand-800);
  background: #fff;
  box-shadow: 0 2px 8px rgb(46 26 75 / 10%);
}

.form-stack,
#match-form,
.profile-form {
  display: grid;
  gap: 1.15rem;
}

label,
legend {
  color: var(--ink-800);
  font-size: 0.9rem;
  font-weight: 700;
}

label {
  display: grid;
  gap: 0.45rem;
}

input,
select,
textarea {
  width: 100%;
  color: var(--ink-950);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
  outline: 0;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

input,
select {
  min-height: 46px;
  padding: 0.68rem 0.78rem;
}

textarea {
  min-height: 100px;
  padding: 0.75rem 0.8rem;
  line-height: 1.5;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #948a9e;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
  border-color: var(--brand-600);
  outline: 0;
  box-shadow: var(--focus);
}

.field-help {
  color: var(--ink-500);
  font-size: 0.78rem;
  font-weight: 500;
}

.button {
  display: inline-flex;
  min-height: 44px;
  padding: 0.68rem 1rem;
  align-items: center;
  justify-content: center;
  color: var(--ink-800);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  font-weight: 750;
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover:not(:disabled) {
  box-shadow: 0 7px 18px rgb(45 25 68 / 12%);
  transform: translateY(-1px);
}

.button:active:not(:disabled) {
  transform: translateY(0);
}

.button-primary {
  color: #fff;
  background: var(--brand-600);
  border-color: var(--brand-600);
}

.button-primary:hover:not(:disabled) {
  background: var(--brand-700);
}

.button-accent {
  color: #fff;
  background: var(--orange-600);
  border-color: var(--orange-600);
}

.button-accent:hover:not(:disabled) {
  background: #a93a06;
}

.button-quiet {
  background: #fff;
}

.button-wide {
  width: 100%;
}

.button-small {
  min-height: 38px;
  padding: 0.5rem 0.75rem;
  font-size: 0.84rem;
}

.demo-login {
  margin-top: 1.4rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.section-label {
  color: var(--ink-800);
  font-size: 0.82rem;
  font-weight: 800;
}

.demo-login p {
  margin: 0.35rem 0 0.8rem;
  color: var(--ink-600);
  font-size: 0.8rem;
}

.demo-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.demo-account {
  min-height: 36px;
  padding: 0.45rem 0.65rem;
  color: var(--brand-800);
  background: var(--brand-50);
  border: 1px solid #d9cdf6;
  border-radius: 9px;
  font-size: 0.78rem;
  font-weight: 700;
}

.onboarding-progress {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 1.25rem;
  color: var(--ink-500);
  font-size: 0.78rem;
  font-weight: 750;
}

.onboarding-progress span {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.onboarding-progress b {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  background: #ece8f1;
  border-radius: 8px;
  font-size: 0.72rem;
}

.onboarding-progress i {
  height: 2px;
  background: var(--line);
}

.onboarding-progress .is-active,
.onboarding-progress .is-done {
  color: var(--brand-700);
}

.onboarding-progress .is-active b,
.onboarding-progress .is-done b {
  color: #fff;
  background: var(--brand-600);
}

.register-step {
  display: grid;
  gap: 1rem;
}

.register-step-heading {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  padding: 0.8rem;
  background: var(--brand-50);
  border: 1px solid #ded3fa;
  border-radius: 13px;
}

.register-step-heading strong,
.register-step-heading small {
  display: block;
}

.register-step-heading small {
  margin-top: 0.1rem;
  color: var(--ink-600);
}

.mini-sticker {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  color: #fff;
  background: var(--brand-600);
  border-radius: 14px 14px 14px 5px;
  font-size: 0.78rem;
  font-weight: 850;
  transform: rotate(-3deg);
}

.mini-sticker-orange {
  background: var(--orange-600);
  transform: rotate(3deg);
}

.compact-fields {
  gap: 0.65rem;
}

.onboarding-choices,
.social-choice {
  margin: 0;
  padding: 0;
  border: 0;
}

.onboarding-choices legend,
.social-choice legend {
  margin-bottom: 0.55rem;
  padding: 0;
}

.choice-grid-small {
  grid-template-columns: repeat(3, 1fr);
}

.social-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
}

.social-cards label {
  position: relative;
}

.social-cards input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.social-cards span {
  display: grid;
  min-height: 72px;
  padding: 0.65rem 0.35rem;
  place-content: center;
  text-align: center;
  background: #f7f5f9;
  border: 1px solid transparent;
  border-radius: 11px;
}

.social-cards b,
.social-cards small {
  display: block;
}

.social-cards small {
  color: var(--ink-500);
  font-weight: 500;
}

.social-cards input:checked + span {
  color: var(--brand-800);
  background: var(--brand-100);
  border-color: #cbb9f6;
}

.social-cards input:focus-visible + span {
  box-shadow: var(--focus);
}

.register-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
}

.form-error {
  margin: 0.9rem 0 0;
  padding: 0.7rem 0.8rem;
  color: var(--danger-700);
  background: var(--danger-100);
  border-radius: 9px;
  font-size: 0.86rem;
  font-weight: 650;
}

.app-shell {
  max-width: 1320px;
  margin: 0 auto;
}

.page-heading {
  display: flex;
  gap: 1.5rem;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.4rem;
}

.page-heading h1 {
  font-size: clamp(1.8rem, 3vw, 2.65rem);
  letter-spacing: -0.035em;
}

.heading-copy {
  margin: 0.45rem 0 0;
  color: var(--ink-600);
}

.mode-pill {
  display: inline-flex;
  max-width: 100%;
  min-height: 34px;
  padding: 0.38rem 0.7rem;
  gap: 0.45rem;
  align-items: center;
  color: var(--brand-800);
  background: var(--brand-100);
  border: 1px solid #d7c9fb;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 750;
}

.mode-pill span[aria-hidden="true"] {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  background: var(--brand-600);
  border-radius: 999px;
}

#agent-mode-label {
  min-width: 0;
  overflow-wrap: anywhere;
}

.workbench {
  display: grid;
  grid-template-columns: minmax(360px, 0.72fr) minmax(0, 1.28fr);
  gap: 1.25rem;
  align-items: start;
}

.request-panel,
.result-panel,
.list-surface,
.profile-form {
  border-radius: var(--radius-large);
}

.request-panel {
  position: sticky;
  top: 98px;
  padding: clamp(1.1rem, 2vw, 1.5rem);
}

.result-panel {
  position: relative;
  min-height: 650px;
  padding: clamp(1.2rem, 2.8vw, 2rem);
  overflow: hidden;
}

.form-section {
  margin: 0;
  padding: 0 0 1.15rem;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.form-section:last-of-type {
  padding-bottom: 0;
  border-bottom: 0;
}

.form-section legend {
  margin-bottom: 0.65rem;
  padding: 0;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.choice-chip {
  display: block;
  position: relative;
}

.choice-chip input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.choice-chip span {
  display: grid;
  min-height: 42px;
  padding: 0.55rem 0.35rem;
  place-items: center;
  color: var(--ink-600);
  background: #f7f5f9;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 700;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
}

.choice-chip input:checked + span {
  color: var(--brand-800);
  background: var(--brand-100);
  border-color: #cbb9f6;
}

.choice-chip input:focus-visible + span {
  box-shadow: var(--focus);
}

.choice-chip:hover span {
  border-color: #cbb9f6;
}

.other-category {
  margin-top: 0.7rem;
  font-size: 0.78rem;
}

.other-category input {
  min-height: 42px;
}

.two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

.location-people {
  grid-template-columns: 1.45fr 0.55fr;
}

.empty-state,
.running-state,
.success-state {
  display: grid;
  min-height: 580px;
  max-width: 520px;
  margin: 0 auto;
  align-content: center;
  justify-items: center;
  text-align: center;
}

.empty-symbol {
  display: grid;
  width: 92px;
  height: 92px;
  margin-bottom: 1.2rem;
  place-items: center;
  color: var(--brand-600);
  background: var(--brand-50);
  border: 1px solid #ded3fa;
  border-radius: 28px;
  transform: rotate(-4deg);
}

.empty-symbol svg {
  width: 62px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 3px;
}

.empty-state h2,
.running-state h2,
.success-state h2,
.result-header h2 {
  margin: 0;
  color: var(--brand-950);
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  line-height: 1.2;
}

.empty-state p,
.success-state > p:not(.eyebrow) {
  max-width: 32rem;
  margin: 0.8rem 0 0;
  color: var(--ink-600);
}

.agent-orbit {
  display: grid;
  width: 80px;
  height: 80px;
  margin-bottom: 1.2rem;
  place-items: center;
  border: 2px solid #d8cdf4;
  border-top-color: var(--brand-600);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.agent-orbit span {
  width: 28px;
  height: 28px;
  background: var(--brand-600);
  border-radius: 9px;
  box-shadow: 0 0 0 8px var(--brand-100);
}

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

.progress-track {
  width: min(390px, 88%);
  height: 7px;
  margin-top: 1.6rem;
  overflow: hidden;
  background: #ece7f2;
  border-radius: 999px;
}

.progress-track span {
  display: block;
  width: 16%;
  height: 100%;
  background: var(--brand-600);
  border-radius: inherit;
  transition: width 300ms ease;
}

.agent-steps {
  display: flex;
  width: min(500px, 100%);
  margin: 1.4rem 0 0;
  padding: 0;
  justify-content: space-between;
  list-style: none;
}

.agent-steps li {
  display: grid;
  gap: 0.35rem;
  justify-items: center;
  color: var(--ink-500);
  font-size: 0.75rem;
  font-weight: 650;
}

.agent-steps span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  background: #eeeaf2;
  border-radius: 9px;
}

.agent-steps li.is-current,
.agent-steps li.is-done {
  color: var(--brand-700);
}

.agent-steps li.is-current span,
.agent-steps li.is-done span {
  color: #fff;
  background: var(--brand-600);
}

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

.result-summary {
  margin: 0.55rem 0 0;
  color: var(--ink-600);
}

.trace-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
  margin: 1.3rem 0;
}

.trace-item {
  padding: 0.75rem;
  color: var(--ink-600);
  background: #f6f3f9;
  border-radius: 11px;
  font-size: 0.77rem;
}

.trace-item strong {
  display: block;
  margin-bottom: 0.18rem;
  color: var(--brand-800);
  font-size: 0.8rem;
}

.notice-stack {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}

.notice {
  display: flex;
  gap: 0.55rem;
  padding: 0.7rem 0.8rem;
  color: var(--ink-800);
  background: var(--brand-50);
  border-left: 3px solid var(--brand-500);
  border-radius: 7px 10px 10px 7px;
  font-size: 0.82rem;
}

.notice-warning {
  color: var(--warning-800);
  background: var(--warning-100);
  border-left-color: #d99017;
}

.candidate-list {
  display: grid;
  gap: 0.75rem;
  padding-bottom: 86px;
}

.candidate-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: center;
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 120ms ease;
}

.candidate-card:hover {
  border-color: #bba6ed;
  box-shadow: 0 9px 22px rgb(50 29 77 / 10%);
  transform: translateY(-1px);
}

.candidate-card.is-selected {
  background: var(--brand-50);
  border-color: var(--brand-500);
  box-shadow: 0 0 0 2px rgb(100 54 200 / 11%);
}

.candidate-card input {
  width: 20px;
  height: 20px;
  accent-color: var(--brand-600);
}

.candidate-main {
  min-width: 0;
}

.candidate-title-row {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  flex-wrap: wrap;
}

.candidate-title-row strong {
  font-size: 1rem;
}

.candidate-kind {
  padding: 0.16rem 0.42rem;
  color: var(--brand-700);
  background: var(--brand-100);
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 800;
}

.candidate-meta {
  margin: 0.25rem 0 0;
  color: var(--ink-600);
  font-size: 0.79rem;
}

.candidate-reasons {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.55rem;
  flex-wrap: wrap;
}

.candidate-reasons span {
  padding: 0.18rem 0.4rem;
  color: var(--ink-600);
  background: #f1eef4;
  border-radius: 6px;
  font-size: 0.68rem;
}

.candidate-score {
  display: grid;
  width: 60px;
  height: 60px;
  place-items: center;
  color: var(--brand-700);
  background: var(--brand-100);
  border-radius: 18px;
  font-size: 1.13rem;
  font-weight: 850;
  line-height: 1;
}

.candidate-score small {
  display: block;
  font-size: 0.6rem;
  font-weight: 700;
}

.confirm-bar {
  position: absolute;
  right: 1.5rem;
  bottom: 1.5rem;
  left: 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0.95rem;
  background: rgb(36 17 63 / 96%);
  border-radius: 14px;
  box-shadow: 0 14px 40px rgb(30 15 48 / 28%);
  backdrop-filter: blur(12px);
}

.confirm-bar strong,
.confirm-bar span {
  display: block;
}

.confirm-bar strong {
  color: #fff;
}

.confirm-bar span {
  margin-top: 0.1rem;
  color: #cec4d9;
  font-size: 0.75rem;
}

.confirm-actions {
  display: flex;
  gap: 0.55rem;
  align-items: center;
}

.confirm-actions .button-quiet {
  color: #fff;
  background: rgb(255 255 255 / 9%);
  border-color: rgb(255 255 255 / 28%);
}

.success-mark {
  display: grid;
  width: 82px;
  height: 82px;
  margin-bottom: 1.2rem;
  place-items: center;
  color: var(--success-700);
  background: var(--success-100);
  border-radius: 50%;
}

.success-mark svg {
  width: 46px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4px;
}

.success-actions {
  display: flex;
  gap: 0.65rem;
  margin-top: 1.4rem;
}

.list-surface,
.profile-form {
  padding: clamp(1rem, 2.8vw, 2rem);
}

.list-surface {
  display: grid;
  gap: 0.8rem;
  align-content: start;
  min-height: 300px;
}

.activity-filters {
  display: inline-flex;
  gap: 0.35rem;
  margin-bottom: 0.8rem;
  padding: 0.3rem;
  background: #eae6ef;
  border-radius: 13px;
}

.filter-chip {
  min-height: 38px;
  padding: 0.5rem 0.9rem;
  color: var(--ink-600);
  background: transparent;
  border: 0;
  border-radius: 9px;
  font-weight: 750;
}

.filter-chip.is-active {
  color: var(--brand-800);
  background: #fff;
  box-shadow: 0 3px 10px rgb(45 25 68 / 10%);
}

.activity-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 17px;
}

.activity-card.needs-review {
  background: linear-gradient(110deg, #fff 58%, #fffaf0);
  border-color: #efd592;
}

.activity-date-tile {
  display: grid;
  width: 68px;
  height: 76px;
  place-content: center;
  color: var(--brand-800);
  background: var(--brand-100);
  border-radius: 18px 18px 18px 6px;
  text-align: center;
  transform: rotate(-2deg);
}

.activity-card:nth-child(3n + 2) .activity-date-tile {
  color: var(--mint-700);
  background: var(--mint-100);
  transform: rotate(2deg);
}

.activity-card:nth-child(3n) .activity-date-tile {
  color: #8a5100;
  background: var(--yellow-100);
}

.activity-date-tile strong,
.activity-date-tile span {
  display: block;
}

.activity-date-tile strong {
  font-size: 1.65rem;
  line-height: 1;
}

.activity-date-tile span {
  margin-top: 0.25rem;
  font-size: 0.74rem;
  font-weight: 750;
}

.activity-card-main {
  min-width: 0;
}

.activity-card h2 {
  margin: 0.15rem 0 0;
  color: var(--brand-950);
  font-size: 1.08rem;
}

.activity-role {
  color: var(--brand-600);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.activity-meta {
  display: flex;
  gap: 0.35rem 0.9rem;
  margin: 0.55rem 0 0;
  color: var(--ink-600);
  flex-wrap: wrap;
  font-size: 0.82rem;
}

.activity-meta span::before {
  margin-right: 0.45rem;
  color: var(--line-strong);
  content: "•";
}

.leave-hint {
  margin: 0.55rem 0 0;
  color: var(--ink-500);
  font-size: 0.76rem;
}

.review-callout {
  display: grid;
  gap: 0.1rem;
  margin-top: 0.8rem;
  padding: 0.75rem 0.85rem;
  color: #704005;
  background: var(--yellow-100);
  border-radius: 11px;
}

.review-callout span {
  font-size: 0.76rem;
}

.activity-actions {
  display: flex;
  gap: 0.55rem;
  margin-top: 0.85rem;
  align-items: center;
  flex-wrap: wrap;
}

.button-text-danger {
  min-height: 38px;
  margin-left: auto;
  color: var(--danger-700);
  background: transparent;
  border-color: transparent;
}

.button-danger {
  color: #fff;
  background: var(--danger-700);
  border-color: var(--danger-700);
}

.empty-list-playful {
  padding: 2rem;
  color: var(--brand-800);
  background:
    radial-gradient(circle at 15% 20%, var(--mint-100), transparent 10rem),
    radial-gradient(circle at 90% 80%, var(--yellow-100), transparent 11rem),
    #fff;
  border-radius: 15px;
}

.peer-review-section {
  margin-top: 1.25rem;
  padding: clamp(1rem, 2.8vw, 2rem);
  background: var(--brand-950);
  border-radius: var(--radius-large);
  color: #fff;
  box-shadow: var(--shadow-large);
}

.section-heading-row {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
}

.section-heading-row h2 {
  margin: 0;
  font-size: clamp(1.3rem, 2.4vw, 1.8rem);
}

.count-pill {
  padding: 0.3rem 0.6rem;
  color: var(--brand-950);
  background: var(--yellow-500);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 850;
}

.section-intro {
  max-width: 48rem;
  margin: 0.65rem 0 1rem;
  color: #d7cede;
}

.peer-review-list {
  display: grid;
  gap: 0.75rem;
}

.peer-task-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem 1rem;
  align-items: center;
  padding: 1rem;
  color: var(--ink-950);
  background: #fff;
  border-radius: 14px;
}

.peer-task-card h3,
.peer-task-card p,
.peer-task-card blockquote {
  margin: 0;
}

.peer-task-card h3 {
  font-size: 1rem;
}

.peer-task-card blockquote,
.peer-task-card p {
  grid-column: 1;
  color: var(--ink-600);
  font-size: 0.82rem;
}

.peer-task-card blockquote {
  padding-left: 0.7rem;
  border-left: 3px solid var(--yellow-500);
}

.list-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.list-card h2 {
  margin: 0;
  color: var(--brand-950);
  font-size: 1.02rem;
}

.list-card p {
  margin: 0.3rem 0 0;
  color: var(--ink-600);
  font-size: 0.84rem;
}

.list-card-actions {
  display: flex;
  gap: 0.5rem;
}

.status-label {
  display: inline-flex;
  min-height: 28px;
  padding: 0.25rem 0.55rem;
  align-items: center;
  color: var(--brand-800);
  background: var(--brand-100);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}

.status-label.is-success {
  color: var(--success-700);
  background: var(--success-100);
}

.status-label.is-muted {
  color: var(--ink-600);
  background: #eeeaf2;
}

.empty-list {
  display: grid;
  min-height: 240px;
  place-items: center;
  color: var(--ink-600);
  text-align: center;
}

.credit-card {
  display: grid;
  min-width: 120px;
  padding: 0.7rem 1rem;
  background: var(--brand-950);
  border-radius: 14px;
  text-align: right;
}

.credit-card span {
  color: #cfc4dc;
  font-size: 0.72rem;
}

.credit-card strong {
  color: #fff;
  font-size: 1.55rem;
}

.profile-form {
  max-width: 980px;
}

.gender-choice {
  margin: 0;
  padding: 0;
  border: 0;
}

.gender-choice legend {
  margin-bottom: 0.55rem;
}

.gender-choice > small {
  display: block;
  margin-top: 0.55rem;
  color: var(--ink-500);
  font-size: 0.75rem;
}

.gender-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
}

.gender-choice-grid label {
  position: relative;
  cursor: pointer;
}

.gender-choice-grid input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.gender-choice-grid span {
  display: flex;
  min-height: 44px;
  gap: 0.35rem;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 0.82rem;
  font-weight: 800;
}

.gender-choice-grid input:focus-visible + span,
.gender-choice-grid input:checked + span {
  border-color: currentcolor;
  box-shadow: 0 0 0 2px rgb(100 54 200 / 13%);
}

.gender-male {
  color: #154f89;
  background: #e4f1ff;
}

.gender-female {
  color: #8b2850;
  background: #ffe5ef;
}

.gender-undisclosed {
  color: #55515e;
  background: #efedf2;
}

.gender-badge,
.gender-count {
  display: inline-flex;
  min-height: 28px;
  gap: 0.3rem;
  padding: 0.28rem 0.55rem;
  align-items: center;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 850;
  white-space: nowrap;
}

.person-profile-tag {
  display: inline-flex;
  min-height: 48px;
  max-width: 100%;
  gap: 0.6rem;
  padding: 0.42rem 0.65rem;
  align-items: center;
  border: 1px solid currentcolor;
  border-radius: 13px;
  text-align: left;
  cursor: pointer;
}

.person-profile-tag:hover {
  filter: brightness(0.97);
}

.person-profile-tag.is-compact {
  width: 100%;
}

.person-profile-tag .person-symbol {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  background: rgb(255 255 255 / 68%);
  border-radius: 50%;
  font-size: 1.05rem;
  font-weight: 900;
}

.person-profile-tag > span:last-child {
  display: grid;
  min-width: 0;
}

.person-profile-tag strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-profile-tag small {
  margin-top: 0.05rem;
  color: currentcolor;
  font-size: 0.66rem;
  opacity: 0.82;
}

.activity-gender-summary {
  display: flex;
  width: fit-content;
  max-width: 100%;
  gap: 0.38rem;
  margin-top: 0.55rem;
  padding: 0.3rem;
  align-items: center;
  flex-wrap: wrap;
  background: #faf8fc;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}

.activity-gender-summary small {
  padding: 0 0.45rem 0 0.2rem;
  color: var(--brand-700);
  font-weight: 800;
}

.activity-gender-summary.is-static {
  cursor: default;
}

.profile-dialog .modal-shell {
  padding-top: 3.2rem;
}

.profile-dialog-loading {
  display: grid;
  min-height: 220px;
  place-content: center;
  color: var(--ink-600);
  text-align: center;
}

.profile-dialog-hero {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1rem;
  color: #fff;
  background:
    radial-gradient(circle at 85% 20%, rgb(255 207 92 / 28%), transparent 10rem),
    var(--brand-950);
  border-radius: 18px;
}

.profile-identity-row {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

.profile-dialog .profile-identity-row h2 {
  margin: 0;
  color: #fff;
}

.profile-dialog-hero p {
  margin: 0.4rem 0 0;
  color: #d8cfe2;
}

.profile-credit-badge {
  display: grid;
  min-width: 92px;
  text-align: right;
}

.profile-credit-badge span {
  color: #d8cfe2;
  font-size: 0.7rem;
}

.profile-credit-badge strong {
  font-size: 1.55rem;
}

.profile-page-section {
  display: grid;
  gap: 0.9rem;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.system-profile-section {
  background: linear-gradient(145deg, #faf7ff, #fffaf0);
  border-color: #dfd1ee;
}

.profile-section-heading span {
  color: var(--brand-600);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.04em;
}

.profile-section-heading h3 {
  margin: 0.18rem 0 0;
  color: var(--brand-950);
}

.profile-bio,
.profile-system-note,
.profile-review-integrity {
  margin: 0;
  color: var(--ink-600);
  line-height: 1.55;
}

.profile-system-note,
.profile-review-integrity {
  font-size: 0.78rem;
}

.profile-fact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.profile-fact-grid > div {
  min-width: 0;
  padding: 0.75rem;
  background: rgb(255 255 255 / 78%);
  border-radius: 12px;
}

.profile-fact-grid small {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--ink-500);
  font-weight: 750;
}

.profile-fact-grid p,
.profile-empty-copy {
  margin: 0;
  color: var(--ink-700);
  font-size: 0.82rem;
}

.profile-chip-list {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.profile-chip-list span {
  padding: 0.28rem 0.5rem;
  color: var(--ink-700);
  background: #f0edf4;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.profile-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
}

.profile-metrics div {
  display: grid;
  padding: 0.7rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: center;
}

.profile-metrics strong {
  color: var(--brand-800);
  font-size: 1.2rem;
}

.profile-metrics span {
  color: var(--ink-600);
  font-size: 0.68rem;
}

.profile-system-summary {
  margin: 0;
  padding: 0.85rem 1rem;
  color: var(--brand-950);
  background: #fff;
  border-left: 4px solid var(--brand-500);
  border-radius: 6px 12px 12px 6px;
  line-height: 1.55;
}

.profile-system-alerts {
  display: grid;
  gap: 0.5rem;
}

.profile-system-alert {
  display: grid;
  gap: 0.15rem;
  padding: 0.7rem 0.8rem;
  color: #72400c;
  background: #fff0d1;
  border-radius: 11px;
}

.profile-system-alert span {
  font-size: 0.75rem;
}

.participant-profile-list {
  display: grid;
  gap: 0.7rem;
}

.participant-profile-card {
  display: grid;
  grid-template-columns: minmax(190px, 0.8fr) minmax(170px, 1fr);
  gap: 0.7rem 1rem;
  align-items: center;
  padding: 0.8rem;
  background: #faf8fc;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.participant-profile-card > p {
  margin: 0;
  color: var(--ink-600);
  font-size: 0.78rem;
}

.participant-profile-card .profile-chip-list,
.participant-profile-card .profile-empty-copy {
  grid-column: 1 / -1;
}

.onboarding-skill,
.skill-editor-card,
.feedback-skill-card {
  padding: 1rem;
  background: linear-gradient(145deg, #fbf8ff, #fff9f3);
  border: 1px solid #e8ddf1;
  border-radius: 16px;
}

.onboarding-skill {
  display: grid;
  gap: 0.85rem;
}

.onboarding-skill > div,
.feedback-skill-toggle span {
  display: grid;
  gap: 0.2rem;
}

.onboarding-skill small,
.skill-editor-heading p,
.feedback-skill-toggle small,
.skill-empty {
  margin: 0;
  color: var(--ink-600);
  font-size: 0.82rem;
  font-weight: 550;
}

.level-control {
  display: grid;
  gap: 0.4rem;
}

.level-control > span:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.level-control output {
  padding: 0.2rem 0.55rem;
  color: var(--brand-950);
  background: #eee3f8;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
}

.level-control input[type="range"] {
  width: 100%;
  min-height: 28px;
  margin: 0;
  accent-color: var(--brand-700);
  cursor: pointer;
}

.level-scale {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  color: var(--ink-600);
}

.level-scale small {
  text-align: center;
  font-size: 0.65rem;
}

.level-scale small:first-child {
  text-align: left;
}

.level-scale small:last-child {
  text-align: right;
}

.skill-editor-card {
  display: grid;
  gap: 1rem;
  margin: 1rem 0;
}

.skill-editor-heading {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
}

.skill-editor-heading h2 {
  margin: 0 0 0.25rem;
  color: var(--brand-950);
  font-size: 1.1rem;
}

.hobby-skill-list {
  display: grid;
  gap: 0.75rem;
}

.hobby-skill-row {
  display: grid;
  grid-template-columns: minmax(170px, 0.8fr) minmax(260px, 1.4fr) auto;
  gap: 0.8rem;
  align-items: end;
  padding: 0.85rem;
  background: rgb(255 255 255 / 78%);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.skill-remove {
  width: 38px;
  height: 38px;
  color: var(--ink-600);
  background: #f1edf5;
  border: 0;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
}

.skill-remove:hover {
  color: var(--danger-700);
  background: var(--danger-100);
}

.skill-marks {
  display: grid;
  gap: 0.55rem;
  padding-top: 0.9rem;
  border-top: 1px dashed #dacbe7;
}

.skill-mark {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  align-items: center;
  padding: 0.7rem 0.8rem;
  color: #6a4b14;
  background: #fff3d8;
  border-radius: 12px;
}

.skill-mark.is-smurfing {
  color: #713b16;
  background: #ffeadc;
}

.skill-mark span {
  font-weight: 850;
}

.skill-mark p {
  margin: 0;
  font-size: 0.82rem;
}

.feedback-skill-card,
.feedback-skill-fields {
  display: grid;
  gap: 0.9rem;
}

.feedback-honesty-note {
  display: grid;
  gap: 0.2rem;
  padding: 0.85rem 1rem;
  color: #6a4312;
  background: #fff4d8;
  border: 1px solid #efd497;
  border-radius: 14px;
}

.feedback-honesty-note strong {
  color: #51300a;
  font-size: 0.92rem;
}

.feedback-honesty-note span {
  font-size: 0.82rem;
  line-height: 1.55;
}

.feedback-skill-toggle {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  cursor: pointer;
}

.feedback-skill-toggle input {
  width: 20px;
  height: 20px;
  accent-color: var(--brand-700);
}

.candidate-system-marks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.6rem;
}

.candidate-system-mark,
.peer-skill-note {
  padding: 0.3rem 0.5rem;
  color: #70430b;
  background: #fff1cf;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 750;
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.group-range {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.form-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: flex-end;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.save-status {
  margin: 0 auto 0 0;
  color: var(--success-700);
  font-size: 0.86rem;
  font-weight: 700;
}

.modal-card {
  width: min(480px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  margin: auto;
  padding: 0;
  overflow: auto;
  color: var(--ink-950);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 28px 90px rgb(27 14 43 / 34%);
}

.modal-card-wide {
  width: min(720px, calc(100vw - 2rem));
}

.modal-card::backdrop {
  background: rgb(24 13 35 / 58%);
  backdrop-filter: blur(5px);
}

.modal-shell {
  position: relative;
  display: grid;
  gap: 1rem;
  padding: clamp(1.2rem, 4vw, 2rem);
}

.modal-shell h2 {
  margin: -0.35rem 2.4rem 0 0;
  color: var(--brand-950);
  font-size: clamp(1.45rem, 4vw, 2rem);
  line-height: 1.2;
}

.modal-copy {
  margin: -0.35rem 0 0;
  color: var(--ink-600);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--ink-600);
  background: #f1eef4;
  border: 0;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
}

.penalty-card {
  display: flex;
  gap: 0.65rem;
  align-items: baseline;
  padding: 1rem;
  color: var(--danger-700);
  background: var(--danger-100);
  border-radius: 14px;
}

.penalty-card.is-zero {
  color: var(--success-700);
  background: var(--success-100);
}

.penalty-card strong {
  font-size: 2rem;
  line-height: 1;
}

.modal-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
}

.rating-field,
.tag-field,
.verdict-field {
  margin: 0;
  padding: 0;
  border: 0;
}

.rating-field legend,
.tag-field legend,
.verdict-field legend {
  margin-bottom: 0.55rem;
  padding: 0;
}

.rating-options {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.4rem;
}

.rating-options label,
.tag-options label,
.verdict-options label {
  position: relative;
}

.rating-options input,
.tag-options input,
.verdict-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.rating-options span {
  display: grid;
  min-height: 65px;
  place-content: center;
  color: var(--ink-600);
  background: #f6f3f9;
  border: 1px solid transparent;
  border-radius: 12px;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 850;
}

.rating-options small {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.65rem;
  font-weight: 600;
}

.rating-options input:checked + span {
  color: #764600;
  background: var(--yellow-100);
  border-color: var(--yellow-500);
}

.tag-options {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.tag-options span {
  display: inline-flex;
  min-height: 38px;
  padding: 0.45rem 0.7rem;
  align-items: center;
  color: var(--ink-600);
  background: #f5f2f7;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.78rem;
}

.tag-options input:checked + span {
  color: var(--brand-800);
  background: var(--brand-100);
  border-color: #cbb9f6;
}

.rating-options input:focus-visible + span,
.tag-options input:focus-visible + span,
.verdict-options input:focus-visible + span {
  box-shadow: var(--focus);
}

.verdict-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.verdict-options span {
  display: grid;
  min-height: 70px;
  padding: 0.65rem;
  align-content: center;
  color: var(--ink-800);
  background: #f6f3f9;
  border: 1px solid transparent;
  border-radius: 12px;
}

.verdict-options b,
.verdict-options small {
  display: block;
}

.verdict-options small {
  color: var(--ink-500);
  font-weight: 500;
}

.verdict-options input:checked + span {
  color: var(--brand-800);
  background: var(--brand-100);
  border-color: #cbb9f6;
}

.toast {
  position: fixed;
  z-index: 50;
  right: 1rem;
  bottom: 1rem;
  max-width: min(390px, calc(100vw - 2rem));
  padding: 0.85rem 1rem;
  color: #fff;
  background: var(--brand-950);
  border-radius: 12px;
  box-shadow: var(--shadow-large);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .app-header {
    grid-template-columns: 1fr auto;
  }

  .main-nav {
    grid-row: 2;
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 0.65rem;
    overflow-x: auto;
    justify-content: flex-start;
  }

  .nav-button {
    flex: 0 0 auto;
  }

  .auth-shell {
    grid-template-columns: 1fr;
    gap: 2rem;
    align-content: center;
  }

  .auth-intro h1 {
    font-size: clamp(2.3rem, 9vw, 4rem);
  }

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

  .request-panel {
    position: static;
  }

  .result-panel {
    min-height: 560px;
  }
}

@media (max-width: 660px) {
  .app-header {
    min-height: 66px;
    padding: 0.6rem 0.8rem;
  }

  .brand small,
  .account-name {
    display: none;
  }

  main {
    padding: 1.25rem 0.8rem 3rem;
  }

  .auth-shell {
    min-height: auto;
  }

  .auth-intro h1 {
    font-size: 2.35rem;
  }

  .auth-steps {
    margin-top: 1.4rem;
  }

  .page-heading {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }

  .mode-pill,
  .credit-card {
    align-self: flex-start;
  }

  .mode-pill {
    flex: 0 0 auto;
  }

  .two-columns,
  .location-people,
  .profile-grid,
  .group-range {
    grid-template-columns: 1fr;
  }

  .hobby-skill-row {
    grid-template-columns: 1fr auto;
  }

  .hobby-skill-row .level-control {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .skill-editor-heading {
    display: grid;
  }

  .gender-choice-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .profile-fact-grid {
    grid-template-columns: 1fr;
  }

  .participant-profile-card {
    grid-template-columns: 1fr;
  }

  .participant-profile-card .profile-chip-list,
  .participant-profile-card .profile-empty-copy {
    grid-column: auto;
  }

  .profile-dialog-hero {
    display: grid;
  }

  .profile-credit-badge {
    text-align: left;
  }

  .choice-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .request-panel,
  .result-panel,
  .list-surface,
  .profile-form,
  .auth-card {
    border-radius: 18px;
  }

  .result-panel {
    min-height: 520px;
    padding: 1rem;
  }

  .empty-state,
  .running-state,
  .success-state {
    min-height: 470px;
  }

  .result-header {
    display: grid;
  }

  .trace-strip {
    grid-template-columns: 1fr;
  }

  .candidate-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .candidate-score {
    grid-row: 1;
    grid-column: 2;
    width: auto;
    height: auto;
    padding: 0.35rem 0.5rem;
    justify-self: end;
    border-radius: 8px;
    font-size: 0.88rem;
  }

  .candidate-main {
    grid-row: 2;
    grid-column: 1 / -1;
  }

  .confirm-bar {
    right: 0.75rem;
    bottom: 0.75rem;
    left: 0.75rem;
    align-items: stretch;
    flex-direction: column;
  }

  .confirm-bar span {
    display: none;
  }

  .confirm-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .confirm-actions .button {
    width: 100%;
  }

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

  .list-card-actions {
    width: 100%;
  }

  .list-card-actions .button {
    flex: 1;
  }

  .activity-card {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.85rem;
  }

  .activity-date-tile {
    width: 54px;
    height: 64px;
    border-radius: 14px 14px 14px 5px;
  }

  .activity-date-tile strong {
    font-size: 1.35rem;
  }

  .activity-meta {
    display: grid;
    gap: 0.15rem;
  }

  .activity-meta span::before {
    content: none;
  }

  .activity-actions .button {
    width: 100%;
    margin-left: 0;
  }

  .peer-task-card {
    grid-template-columns: 1fr;
  }

  .peer-task-card .button,
  .peer-task-card blockquote,
  .peer-task-card p {
    grid-column: 1;
  }

  .social-cards {
    grid-template-columns: 1fr;
  }

  .social-cards span {
    min-height: 58px;
  }

  .modal-actions,
  .register-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .modal-actions .button,
  .register-actions .button {
    width: 100%;
  }

  .rating-options {
    gap: 0.25rem;
  }

  .rating-options span {
    min-height: 58px;
    font-size: 1rem;
  }

  .rating-options small {
    display: none;
  }

  .verdict-options {
    grid-template-columns: 1fr;
  }

  .credit-card {
    min-width: 96px;
  }

  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .save-status {
    margin: 0;
  }
}

.square-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 0.9rem;
  align-items: end;
  padding: 1rem;
  margin-bottom: 1.25rem;
  background: rgb(255 255 255 / 82%);
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-small);
}

.square-filters label {
  display: grid;
  gap: 0.35rem;
  color: var(--ink-800);
  font-weight: 700;
}

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

.square-grid > .empty-list {
  grid-column: 1 / -1;
}

.square-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1.15rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-small);
}

.square-card-top,
.square-card-action,
.time-vote-card > div:first-child {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  justify-content: space-between;
}

.square-card h2 {
  margin: 0.7rem 0 0.35rem;
  font-size: 1.15rem;
  line-height: 1.3;
}

.square-card p {
  margin: 0.15rem 0;
}

.square-time {
  color: var(--brand-800);
  font-weight: 800;
}

.square-location,
.square-description {
  color: var(--ink-600);
}

.square-description {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 0.65rem !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.square-score {
  color: var(--mint-700);
  font-size: 0.85rem;
  font-weight: 800;
}

.square-card .candidate-reasons {
  margin-top: 0.8rem;
}

.square-card-action {
  margin-top: auto;
  padding-top: 1rem;
}

.square-card-action .button {
  width: 100%;
}

.load-more-row {
  display: flex;
  justify-content: center;
  padding: 1.4rem 0;
}

.ai-summary-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.25rem;
  align-items: center;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, var(--brand-50), var(--mint-100));
  border: 1px solid rgb(100 54 200 / 18%);
  border-radius: var(--radius-large);
}

.ai-summary-card h2,
.ai-summary-card p {
  margin: 0.2rem 0;
}

.ai-summary-card small {
  display: block;
  margin-top: 0.45rem;
  color: var(--ink-600);
}

.dialog-divider {
  height: 1px;
  margin: 1.25rem 0;
  background: var(--line);
}

.time-vote-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.8rem;
}

.time-vote-card {
  padding: 0.9rem;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
}

.time-vote-card p {
  margin: 0.45rem 0;
  font-weight: 700;
}

.time-vote-card small {
  color: var(--ink-600);
}

.photo-upload-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin: 1rem 0;
}

.file-picker {
  flex: 1;
  padding: 0.75rem;
  background: var(--brand-50);
  border: 1px dashed var(--brand-500);
  border-radius: var(--radius-small);
  font-weight: 700;
}

.file-picker input {
  display: block;
  width: 100%;
  margin-top: 0.4rem;
}

.activity-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.activity-photo-grid > .empty-list {
  grid-column: 1 / -1;
}

.activity-photo {
  overflow: hidden;
  margin: 0;
  background: var(--canvas);
  border-radius: var(--radius-small);
}

.activity-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.activity-photo figcaption {
  padding: 0.55rem 0.7rem;
  color: var(--ink-600);
  font-size: 0.85rem;
}

@media (max-width: 980px) {
  .square-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .square-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .square-filters,
  .square-grid,
  .ai-summary-card,
  .activity-photo-grid {
    grid-template-columns: 1fr;
  }

  .square-filters .button,
  .ai-summary-card .button,
  .photo-upload-row .button {
    width: 100%;
  }

  .photo-upload-row {
    align-items: stretch;
    flex-direction: column;
  }
}

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

/* Follow the device appearance without storing a separate user preference. */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --brand-950: #f2eaff;
    --brand-900: #432669;
    --brand-800: #d1bfff;
    --brand-700: #c4a8ff;
    --brand-600: #b18dff;
    --brand-500: #9973e6;
    --brand-100: #392b50;
    --brand-50: #2a2138;
    --mint-700: #79e2c6;
    --mint-100: #1e3b36;
    --yellow-100: #473a20;
    --coral-100: #4b2b36;
    --ink-950: #f7f3fa;
    --ink-800: #e1d9e8;
    --ink-700: #cec4d7;
    --ink-600: #bcb1c7;
    --ink-500: #ada0ba;
    --surface: #231e2b;
    --canvas: #15121c;
    --line: #4d4558;
    --line-strong: #6a5e77;
    --success-700: #83e8af;
    --success-100: #1b3e2c;
    --warning-800: #ffd890;
    --warning-100: #44341d;
    --danger-700: #ff9d9d;
    --danger-100: #472b32;
    --shadow-small: 0 6px 18px rgb(0 0 0 / 20%);
    --shadow-large: 0 20px 60px rgb(0 0 0 / 32%);
    --focus: 0 0 0 3px rgb(177 141 255 / 45%);
  }

  body {
    background:
      radial-gradient(circle at 9% 8%, rgb(122 78 224 / 11%), transparent 26rem),
      radial-gradient(circle at 92% 18%, rgb(32 185 154 / 7%), transparent 22rem),
      var(--canvas);
  }

  .app-header {
    background: rgb(27 23 35 / 94%);
    border-bottom-color: var(--line);
  }

  .main-nav,
  .segmented-control,
  .activity-filters,
  .onboarding-progress b,
  .progress-track,
  .agent-steps span,
  .status-label.is-muted,
  .profile-chip-list span,
  .skill-remove,
  .modal-close {
    background: #302a39;
  }

  .nav-button.is-active,
  .segment.is-active,
  .filter-chip.is-active,
  input,
  select,
  textarea,
  .button,
  .button-quiet,
  .candidate-card,
  .activity-card,
  .list-card,
  .peer-task-card,
  .profile-metrics div,
  .profile-system-summary,
  .modal-card {
    background: var(--surface);
  }

  .button-primary,
  .brand-mark,
  .mini-sticker,
  .onboarding-progress .is-active b,
  .onboarding-progress .is-done b,
  .agent-steps li.is-current span,
  .agent-steps li.is-done span {
    color: #fff;
    background: #6840b8;
    border-color: #6840b8;
  }

  .button-primary:hover:not(:disabled) {
    background: #7651c4;
  }

  .mini-sticker-orange,
  .button-accent,
  .nav-badge {
    color: #fff;
    background: #aa3e0a;
  }

  .nav-badge-mint {
    background: #087866;
  }

  .button-danger {
    color: #fff;
    background: #ad2b2b;
    border-color: #ad2b2b;
  }

  .social-cards span,
  .choice-chip span,
  .trace-item,
  .rating-options span,
  .tag-options span,
  .verdict-options span,
  .participant-profile-card,
  .activity-gender-summary,
  .candidate-reasons span,
  .modal-close,
  .skill-remove {
    background: #302a39;
  }

  .social-cards input:checked + span,
  .choice-chip input:checked + span,
  .tag-options input:checked + span,
  .verdict-options input:checked + span,
  .candidate-card.is-selected {
    background: var(--brand-100);
    border-color: var(--brand-500);
  }

  .demo-account,
  .register-step-heading,
  .empty-symbol,
  .mode-pill {
    border-color: #6b568d;
  }

  .agent-orbit {
    border-color: #55446b;
    border-top-color: var(--brand-600);
  }

  .activity-card.needs-review {
    background: linear-gradient(110deg, var(--surface) 58%, #352b20);
    border-color: #7a6131;
  }

  .empty-list-playful {
    background:
      radial-gradient(circle at 15% 20%, var(--mint-100), transparent 10rem),
      radial-gradient(circle at 90% 80%, var(--yellow-100), transparent 11rem),
      var(--surface);
  }

  .peer-review-section,
  .credit-card,
  .toast {
    background-color: #302044;
  }

  .profile-dialog-hero {
    background:
      radial-gradient(circle at 85% 20%, rgb(255 207 92 / 16%), transparent 10rem),
      #302044;
  }

  .peer-task-card {
    color: var(--ink-950);
  }

  .system-profile-section,
  .onboarding-skill,
  .skill-editor-card,
  .feedback-skill-card {
    background: linear-gradient(145deg, #2d253a, #332a29);
    border-color: var(--line);
  }

  .profile-fact-grid > div,
  .hobby-skill-row,
  .square-filters {
    background: rgb(35 30 43 / 92%);
  }

  .level-control output {
    background: var(--brand-100);
  }

  .rating-options input:checked + span {
    border-color: var(--yellow-500);
  }

  .activity-card:nth-child(3n) .activity-date-tile,
  .review-callout,
  .rating-options input:checked + span {
    color: #ffdc91;
  }

  .skill-mark,
  .skill-mark.is-smurfing,
  .feedback-honesty-note,
  .candidate-system-mark,
  .peer-skill-note,
  .profile-system-alert {
    color: #ffdc91;
    background: var(--warning-100);
    border-color: #765d32;
  }

  .feedback-honesty-note strong {
    color: #fff1cd;
  }

  .gender-male {
    color: #a9d3ff;
    background: #1d354c;
  }

  .gender-female {
    color: #ffb6ce;
    background: #4b293c;
  }

  .gender-undisclosed {
    color: #d4ccd9;
    background: #39343f;
  }

  .person-profile-tag .person-symbol {
    background: rgb(0 0 0 / 18%);
  }

  input::placeholder,
  textarea::placeholder {
    color: #a99cb4;
  }

  .confirm-bar {
    background: rgb(43 29 62 / 97%);
  }
}
