:root {
  --bg: oklch(0.965 0.006 190);
  --surface: oklch(0.995 0.002 190);
  --surface-soft: oklch(0.945 0.012 190);
  --ink: oklch(0.28 0.025 190);
  --muted: oklch(0.48 0.018 190);
  --primary: oklch(0.43 0.072 185);
  --primary-hover: oklch(0.37 0.066 185);
  --primary-tint: oklch(0.92 0.025 185);
  --brand-dark: oklch(0.29 0.038 190);
  --brand-dark-2: oklch(0.24 0.034 190);
  --gold: oklch(0.75 0.08 85);
  --gold-soft: oklch(0.94 0.035 85);
  --border: oklch(0.88 0.01 190);
  --error: oklch(0.52 0.16 28);
  --error-soft: oklch(0.94 0.035 28);
  --warning: oklch(0.66 0.11 75);
  --warning-soft: oklch(0.95 0.035 75);
  --success: oklch(0.49 0.09 155);
  --success-soft: oklch(0.93 0.035 155);
  --radius: 12px;
  --radius-small: 8px;
  --shadow-small: 0 3px 8px oklch(0.25 0.02 190 / 0.08);
  --content: 1120px;
  --member-content: 920px;
  --transition: 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.65;
}

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

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

button {
  min-height: 44px;
  cursor: pointer;
}

button:disabled,
input:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.35;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

:focus-visible {
  outline: 3px solid color-mix(in oklch, var(--primary) 45%, white);
  outline-offset: 3px;
}

.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: 30;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-small);
  background: var(--surface);
  color: var(--brand-dark);
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform var(--transition);
}

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

.icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.app-header {
  min-height: 72px;
  background: var(--brand-dark);
  color: white;
}

.header-inner {
  width: min(var(--content), calc(100% - 64px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-lockup > span:last-child {
  display: grid;
}

.brand-lockup strong {
  font-size: 18px;
  letter-spacing: 0.04em;
}

.brand-lockup small {
  color: oklch(0.83 0.014 190);
  font-size: 12px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid oklch(0.75 0.08 85 / 0.65);
  border-radius: 50%;
  color: var(--gold);
}

.brand-mark .icon {
  width: 24px;
  height: 24px;
}

.header-context {
  display: flex;
  align-items: center;
  gap: 16px;
  color: oklch(0.94 0.006 190);
}

.quiet-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: oklch(0.82 0.018 190);
  font-size: 13px;
  text-underline-offset: 4px;
}

.app-main {
  min-height: calc(100vh - 72px);
}

.member-shell {
  width: min(var(--member-content), calc(100% - 64px));
  margin: 0 auto;
  padding: 24px 0 64px;
}

.demo-notice {
  min-height: 38px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: var(--radius-small);
  background: var(--gold-soft);
  color: oklch(0.38 0.045 75);
  font-size: 12px;
}

.demo-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--gold);
}

.member-welcome {
  padding: 30px 0 24px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.member-welcome h1,
.page-heading h1 {
  margin-bottom: 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.context-line {
  margin-bottom: 6px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
}

.phase-chip,
.status-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.phase-chip,
.status-current {
  background: var(--primary-tint);
  color: var(--primary-hover);
}

.status-success {
  background: var(--success-soft);
  color: oklch(0.37 0.09 155);
}

.status-warning {
  background: var(--warning-soft);
  color: oklch(0.43 0.09 75);
}

.status-error {
  background: var(--error-soft);
  color: var(--error);
}

.status-neutral {
  background: var(--surface-soft);
  color: var(--muted);
}

.status-muted {
  background: oklch(0.94 0.004 190);
  color: oklch(0.53 0.01 190);
}

.phase-progress {
  margin: 0 0 32px;
  padding: 20px 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  list-style: none;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.phase-progress li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.phase-progress li:not(:last-child)::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 17px;
  right: 10px;
  width: calc(100% - 54px);
  height: 1px;
  background: var(--border);
  transform: translateX(50%);
}

.phase-node {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.phase-node .icon {
  width: 16px;
  height: 16px;
}

.phase-progress .is-current .phase-node {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.phase-progress .is-complete .phase-node {
  border-color: var(--primary-tint);
  background: var(--primary-tint);
  color: var(--primary);
}

.phase-copy {
  position: relative;
  z-index: 1;
  display: grid;
  background: var(--surface);
}

.phase-copy strong {
  font-size: 14px;
}

.phase-copy small {
  color: var(--muted);
  font-size: 11px;
}

.member-content {
  min-width: 0;
}

.page-heading {
  margin-bottom: 22px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.page-heading p {
  max-width: 68ch;
  margin: 8px 0 0;
  color: var(--muted);
}

.task-layout,
.publish-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(240px, 0.8fr);
  gap: 24px;
  align-items: start;
}

.task-primary,
.panel,
.vote-surface,
.results-surface {
  padding: 26px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.task-aside {
  padding: 22px;
  border-top: 3px solid var(--brand-dark);
  border-radius: var(--radius);
  background: var(--surface);
}

.task-aside h2,
.panel h2,
.section-heading h2 {
  margin-bottom: 4px;
  font-size: 18px;
}

.principle-list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.principle-list li {
  padding: 14px 0;
  display: grid;
  gap: 3px;
  border-top: 1px solid var(--border);
}

.principle-list span {
  color: var(--muted);
  font-size: 13px;
}

.privacy-note,
.notice-panel {
  margin-bottom: 22px;
  padding: 16px;
  display: flex;
  gap: 12px;
  border-radius: var(--radius-small);
  background: var(--primary-tint);
  color: var(--primary-hover);
}

.privacy-note.compact {
  margin-bottom: 16px;
}

.privacy-note strong,
.notice-panel h2 {
  display: block;
  margin-bottom: 2px;
  font-size: 14px;
}

.privacy-note p,
.notice-panel p {
  margin: 0;
  color: color-mix(in oklch, var(--primary-hover) 80%, var(--muted));
  font-size: 13px;
}

.form-stack {
  display: grid;
  gap: 22px;
}

.login-shell {
  min-height: calc(100vh - 170px);
  display: grid;
  place-items: center;
  padding: 36px 0;
}

.login-panel {
  width: min(460px, 100%);
  padding: 34px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 24px oklch(0.25 0.02 190 / 0.12);
}

.login-symbol {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
}

.login-symbol .icon {
  width: 24px;
  height: 24px;
}

.login-panel h1 {
  margin: 8px 0 10px;
  font-size: 28px;
}

.login-panel > p {
  color: var(--muted);
  line-height: 1.7;
}

.login-panel form {
  margin-top: 26px;
}

.login-note {
  margin: 18px 0 0;
  font-size: 12px;
}

.field {
  display: grid;
  gap: 8px;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.field label,
.field-label-row label {
  font-size: 13px;
  font-weight: 700;
}

.field-label-row span,
.field-help {
  color: var(--muted);
  font-size: 12px;
}

.field-help,
.field-error {
  margin: 0;
}

.field-error {
  min-height: 0;
  color: var(--error);
  font-size: 12px;
}

input[type="text"],
input:not([type]),
textarea,
select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: white;
  transition: border-color var(--transition), box-shadow var(--transition);
}

textarea {
  resize: vertical;
  line-height: 1.65;
}

input:hover,
textarea:hover,
select:hover {
  border-color: color-mix(in oklch, var(--primary) 40%, var(--border));
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-tint);
  outline: none;
}

.has-error input,
.has-error textarea {
  border-color: var(--error);
  background: var(--error-soft);
}

.button {
  min-height: 44px;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: var(--radius-small);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

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

.button-primary {
  background: var(--primary);
  color: white;
}

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

.button-secondary {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
}

.button-secondary:hover:not(:disabled) {
  border-color: var(--primary);
  background: var(--primary-tint);
  color: var(--primary-hover);
}

.button-quiet {
  min-height: 44px;
  padding: 7px 10px;
  background: transparent;
  color: var(--primary);
}

.button-quiet:hover:not(:disabled) {
  background: var(--primary-tint);
}

.button-danger {
  background: var(--error);
  color: white;
}

.button-danger:hover {
  background: oklch(0.44 0.15 28);
}

.button-full {
  width: 100%;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
}

.waiting-panel,
.completion-panel,
.monitor-hero,
.overview-band {
  padding: 34px;
  border-radius: var(--radius);
  background: var(--brand-dark);
  color: white;
}

.waiting-panel {
  display: flex;
  align-items: center;
  gap: 24px;
}

.waiting-compass,
.completion-mark {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid oklch(0.75 0.08 85 / 0.55);
  border-radius: 50%;
  color: var(--gold);
}

.waiting-compass .icon,
.completion-mark .icon {
  width: 34px;
  height: 34px;
}

.waiting-copy h2,
.completion-panel h2 {
  margin-bottom: 10px;
  font-size: 23px;
}

.waiting-copy p:last-child,
.completion-panel > p {
  max-width: 66ch;
  margin-bottom: 0;
  color: oklch(0.86 0.012 190);
}

.submission-review {
  margin-top: 18px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.submission-review summary {
  min-height: 52px;
  padding: 14px 18px;
  cursor: pointer;
  font-weight: 700;
}

.submission-readonly {
  padding: 0 18px 20px;
}

.submission-readonly h3 {
  margin-bottom: 8px;
  font-size: 16px;
}

.submission-readonly p,
.muted-copy {
  color: var(--muted);
}

.selection-counter {
  min-width: 92px;
  padding: 8px 12px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  border-radius: var(--radius-small);
  background: var(--primary-tint);
  color: var(--primary-hover);
}

.selection-counter strong {
  font-size: 22px;
}

.topic-options {
  display: grid;
  gap: 10px;
}

.topic-option {
  min-height: 82px;
  padding: 15px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.topic-option:hover {
  border-color: color-mix(in oklch, var(--primary) 55%, var(--border));
}

.topic-option:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-tint);
}

.topic-option.is-selected {
  border-color: var(--primary);
  background: var(--primary-tint);
}

.topic-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.topic-code {
  width: 40px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 6px;
  background: var(--brand-dark);
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.topic-option-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.topic-option-copy strong {
  font-size: 15px;
}

.topic-option-copy > span {
  color: var(--muted);
  font-size: 13px;
}

.check-indicator {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: transparent;
}

.check-indicator .icon {
  width: 15px;
  height: 15px;
}

.is-selected .check-indicator {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.sticky-submit {
  position: sticky;
  bottom: 12px;
  z-index: 5;
  margin-top: 18px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-radius: var(--radius);
  background: var(--brand-dark);
  color: white;
  box-shadow: 0 6px 8px oklch(0.22 0.02 190 / 0.12);
}

.sticky-submit > div {
  display: grid;
}

.sticky-submit span {
  color: oklch(0.82 0.012 190);
  font-size: 12px;
}

.completion-panel {
  padding: 44px;
  text-align: center;
}

.completion-mark {
  margin: 0 auto 18px;
  background: var(--gold);
  color: var(--brand-dark);
}

.completion-meta {
  width: min(460px, 100%);
  margin: 28px auto 0;
  padding-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid oklch(0.62 0.025 190 / 0.45);
}

.completion-meta div {
  display: grid;
}

.completion-meta dt {
  color: oklch(0.78 0.012 190);
  font-size: 12px;
}

.completion-meta dd {
  margin: 0;
  font-weight: 700;
}

.results-summary,
.metric-strip {
  margin-bottom: 22px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.results-summary > div,
.metric-strip > div {
  padding: 16px;
  display: grid;
  gap: 2px;
}

.results-summary > div:not(:last-child),
.metric-strip > div:not(:last-child) {
  border-right: 1px solid var(--border);
}

.results-summary span,
.metric-strip span,
.metric-strip small {
  color: var(--muted);
  font-size: 12px;
}

.results-summary strong,
.metric-strip strong {
  font-size: 20px;
}

.result-list {
  display: grid;
}

.result-row {
  padding: 16px 0;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 72px;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--border);
}

.result-rank,
.result-score {
  display: grid;
}

.result-rank span,
.result-score span {
  color: var(--muted);
  font-size: 11px;
}

.result-rank strong {
  color: var(--gold);
  font-size: 24px;
}

.result-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.result-title h3 {
  margin: 0;
  font-size: 15px;
}

.result-bar {
  height: 5px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface-soft);
}

.result-bar span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--primary);
}

.result-score {
  text-align: right;
}

.method-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.empty-state,
.loading-state,
.noscript-notice {
  width: min(620px, calc(100% - 32px));
  margin: 64px auto;
  padding: 40px;
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
  box-shadow: var(--shadow-small);
}

.empty-symbol {
  width: 58px;
  height: 58px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-tint);
  color: var(--primary);
}

.empty-state h2 {
  margin-bottom: 8px;
  font-size: 22px;
}

.empty-state p {
  color: var(--muted);
}

.loading-line {
  width: 70%;
  height: 10px;
  margin: 0 auto 12px;
  display: block;
  border-radius: 99px;
  background: var(--surface-soft);
}

.loading-line-short {
  width: 42%;
}

.admin-main {
  background: var(--bg);
}

.admin-shell {
  width: min(var(--content), calc(100% - 64px));
  margin: 0 auto;
  padding: 24px 0 64px;
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.admin-nav {
  position: sticky;
  top: 24px;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--brand-dark);
  color: white;
}

.admin-nav-links {
  display: grid;
  gap: 3px;
}

.admin-nav-links a {
  min-height: 44px;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  border-radius: 7px;
  color: oklch(0.84 0.012 190);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.admin-nav-links a:hover,
.admin-nav-links a.is-active {
  background: oklch(0.4 0.052 190);
  color: white;
}

.admin-nav-links a.is-active {
  box-shadow: inset 3px 0 0 var(--gold);
}

.admin-nav-foot {
  margin-top: 12px;
  padding: 14px 11px 4px;
  display: grid;
  border-top: 1px solid oklch(0.48 0.035 190);
}

.admin-nav-foot span {
  color: oklch(0.73 0.012 190);
  font-size: 11px;
}

.admin-nav-select,
.admin-nav-select-label {
  display: none;
}

.admin-workspace {
  min-width: 0;
}

.admin-workspace > .demo-notice {
  margin-bottom: 24px;
}

.overview-band {
  margin-bottom: 18px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.overview-band h2 {
  max-width: 650px;
  margin-bottom: 8px;
  font-size: 22px;
}

.overview-band p:last-child {
  margin-bottom: 0;
  color: oklch(0.82 0.012 190);
}

.overview-actions,
.heading-actions,
.section-actions,
.row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.metric-strip {
  grid-template-columns: repeat(4, 1fr);
  background: var(--surface);
}

.panel {
  margin-bottom: 18px;
}

.section-heading {
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.admin-phase-rail {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  list-style: none;
}

.admin-phase-rail li {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}

.admin-phase-rail li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 17px;
  left: calc(50% + 20px);
  width: calc(100% - 40px);
  height: 1px;
  background: var(--border);
}

.admin-phase-rail li > span {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.admin-phase-rail .is-current > span {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.admin-phase-rail .is-complete > span {
  border-color: var(--success);
  background: var(--success-soft);
  color: var(--success);
}

.admin-phase-rail .icon {
  width: 15px;
  height: 15px;
}

.admin-phase-rail div {
  display: grid;
}

.admin-phase-rail small {
  color: var(--muted);
  font-size: 11px;
}

.notice-panel {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-small);
}

.notice-panel p {
  color: var(--muted);
}

.notice-index {
  width: 44px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 6px;
  background: var(--brand-dark);
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
}

.notice-warning {
  background: var(--warning-soft);
  color: oklch(0.39 0.07 75);
  box-shadow: none;
}

.notice-private {
  background: var(--primary-tint);
  color: var(--primary-hover);
  box-shadow: none;
}

.table-panel {
  padding: 0;
  overflow: hidden;
}

.table-panel .section-heading {
  padding: 22px 24px 0;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th,
td {
  padding: 13px 16px;
  border-top: 1px solid var(--border);
  vertical-align: middle;
  white-space: nowrap;
}

th {
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
}

td strong,
td small {
  display: block;
}

td small {
  color: var(--muted);
  font-size: 11px;
}

.copy-link,
.text-button {
  min-height: 44px;
  padding: 6px 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}

.copy-link:hover,
.text-button:hover:not(:disabled) {
  background: var(--primary-tint);
}

.copy-link .icon {
  width: 16px;
  height: 16px;
}

.danger-text {
  color: var(--error) !important;
}

.curation-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.5fr);
  gap: 18px;
  align-items: start;
}

.source-panel {
  position: sticky;
  top: 24px;
}

.selection-note {
  color: var(--muted);
  font-size: 12px;
}

.source-list,
.curated-list {
  display: grid;
  gap: 10px;
}

.source-list {
  max-height: 590px;
  margin-bottom: 16px;
  overflow-y: auto;
}

.source-item {
  min-height: 58px;
  padding: 10px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}

.source-item:hover,
.source-item.is-selected {
  border-color: var(--primary);
  background: var(--primary-tint);
}

.source-item input {
  margin-top: 4px;
  accent-color: var(--primary);
}

.source-item span {
  display: grid;
}

.source-item strong {
  font-size: 13px;
}

.source-item small {
  color: var(--muted);
  font-size: 11px;
}

.curated-topic-form {
  margin: 0;
}

.curated-head {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.curated-head h2 {
  margin: 0;
  font-size: 16px;
}

.curated-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.compact-field {
  margin-bottom: 12px;
  gap: 5px;
}

.compact-field textarea {
  min-height: 82px;
}

.curated-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.curated-actions > span {
  color: var(--muted);
  font-size: 11px;
}

.preview-list {
  display: grid;
}

.preview-list > div {
  padding: 12px 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-top: 1px solid var(--border);
}

.preview-list > div > span:last-child {
  display: grid;
}

.preview-list small {
  color: var(--muted);
}

.preview-more {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.check-list {
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  list-style: none;
}

.check-list li {
  padding: 12px 0;
  display: flex;
  gap: 10px;
  border-top: 1px solid var(--border);
}

.check-list li > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.check-list .icon {
  width: 15px;
  height: 15px;
}

.check-list .is-pass > span {
  background: var(--success-soft);
  color: var(--success);
}

.check-list .is-fail > span {
  background: var(--warning-soft);
  color: var(--warning);
}

.check-list div {
  display: grid;
}

.check-list small {
  color: var(--muted);
}

.monitor-hero {
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.monitor-hero > div:first-child {
  display: grid;
}

.monitor-hero > div:first-child > span {
  color: oklch(0.8 0.012 190);
}

.monitor-hero strong {
  font-size: 52px;
  line-height: 1.1;
}

.monitor-hero strong small {
  color: oklch(0.72 0.012 190);
  font-size: 20px;
}

.monitor-hero p {
  margin: 10px 0 0;
  color: oklch(0.84 0.012 190);
}

.progress-ring {
  --value: calc(var(--progress) * 1%);
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--gold) var(--value), oklch(0.42 0.04 190) 0);
}

.progress-ring::before {
  content: "";
  grid-area: 1 / 1;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: var(--brand-dark);
}

.progress-ring span {
  z-index: 1;
  grid-area: 1 / 1;
  font-weight: 700;
}

.incomplete-list,
.completed-members {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
}

.incomplete-list > div,
.completed-members > div {
  min-height: 48px;
  padding: 8px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--border);
}

.incomplete-list span {
  display: grid;
}

.incomplete-list small {
  color: var(--muted);
}

.inline-success {
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  background: var(--success-soft);
  color: oklch(0.36 0.08 155);
}

.audit-list {
  display: grid;
}

.audit-list article {
  position: relative;
  padding: 0 0 20px 28px;
  display: grid;
  grid-template-columns: 1fr;
}

.audit-list article:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 0;
  left: 6px;
  width: 1px;
  background: var(--border);
}

.audit-dot {
  position: absolute;
  top: 6px;
  left: 0;
  width: 13px;
  height: 13px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.audit-list article > div > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.audit-list time,
.audit-list p {
  color: var(--muted);
  font-size: 12px;
}

.audit-list p {
  margin: 3px 0 0;
}

.confirm-dialog {
  width: min(520px, calc(100% - 32px));
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 10px 30px oklch(0.18 0.025 190 / 0.25);
}

.confirm-dialog::backdrop {
  background: oklch(0.18 0.025 190 / 0.58);
}

.dialog-body {
  padding: 28px;
}

.dialog-symbol {
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-tint);
  color: var(--primary);
}

.dialog-body h2 {
  margin-bottom: 8px;
  font-size: 20px;
}

.dialog-body > p {
  color: var(--muted);
}

.dialog-preview,
.dialog-selection,
.dialog-source-list {
  margin: 18px 0;
  padding: 16px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.dialog-preview p {
  margin: 6px 0 0;
  color: var(--muted);
}

.dialog-selection,
.dialog-source-list {
  display: grid;
  gap: 8px;
  list-style: none;
}

.dialog-selection li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dialog-actions {
  margin-top: 22px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.toast-region {
  position: fixed;
  z-index: 40;
  right: 20px;
  bottom: 20px;
  width: min(380px, calc(100% - 40px));
}

.toast {
  padding: 13px 16px;
  border-radius: var(--radius-small);
  background: var(--brand-dark);
  color: white;
  box-shadow: 0 6px 8px oklch(0.18 0.02 190 / 0.2);
}

.toast-error {
  background: var(--error);
}

.toast-success {
  background: oklch(0.36 0.08 155);
}

@media (max-width: 900px) {
  .header-inner,
  .admin-shell {
    width: min(100% - 32px, var(--content));
  }

  .admin-shell {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .admin-nav {
    position: static;
    padding: 12px;
  }

  .admin-nav-links,
  .admin-nav-foot {
    display: none;
  }

  .admin-nav-select-label {
    display: block;
    margin-bottom: 6px;
    color: oklch(0.8 0.012 190);
    font-size: 11px;
  }

  .admin-nav-select {
    display: block;
    border-color: oklch(0.48 0.035 190);
    background: var(--brand-dark-2);
    color: white;
  }

  .curation-layout {
    grid-template-columns: 1fr;
  }

  .source-panel {
    position: static;
  }

  .source-list {
    max-height: 340px;
  }
}

@media (max-width: 720px) {
  .header-inner,
  .member-shell {
    width: min(100% - 24px, var(--member-content));
  }

  .header-inner {
    min-height: 64px;
  }

  .app-header {
    min-height: 64px;
  }

  .brand-lockup small,
  .header-context > span,
  .header-context .status-tag {
    display: none;
  }

  .member-shell,
  .admin-shell {
    padding-top: 16px;
  }

  .member-welcome,
  .page-heading,
  .section-heading,
  .overview-band,
  .monitor-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .member-welcome h1,
  .page-heading h1 {
    font-size: 24px;
  }

  .phase-progress {
    padding: 14px;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .phase-progress li:not(:last-child)::after {
    top: 33px;
    left: 17px;
    width: 1px;
    height: 23px;
    transform: none;
  }

  .task-layout,
  .publish-layout {
    grid-template-columns: 1fr;
  }

  .task-primary,
  .panel,
  .vote-surface,
  .results-surface {
    padding: 20px;
  }

  .waiting-panel {
    padding: 26px;
    align-items: flex-start;
    flex-direction: column;
  }

  .topic-option {
    min-height: 72px;
    grid-template-columns: 40px minmax(0, 1fr) 26px;
    gap: 10px;
  }

  .sticky-submit {
    align-items: stretch;
    flex-direction: column;
  }

  .completion-panel {
    padding: 32px 20px;
  }

  .results-summary,
  .metric-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .results-summary > div:nth-child(2),
  .metric-strip > div:nth-child(2) {
    border-right: 0;
  }

  .results-summary > div:nth-child(n + 3),
  .metric-strip > div:nth-child(n + 3) {
    border-top: 1px solid var(--border);
  }

  .result-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .result-score {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    gap: 8px;
    text-align: left;
  }

  .admin-phase-rail {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px 0;
  }

  .admin-phase-rail li:nth-child(3)::after {
    display: none;
  }

  .incomplete-list,
  .completed-members {
    grid-template-columns: 1fr;
  }

  .progress-ring {
    width: 96px;
    height: 96px;
  }

  .progress-ring::before {
    width: 70px;
    height: 70px;
  }

  .heading-actions,
  .section-actions {
    width: 100%;
  }

  .heading-actions .button,
  .section-actions .button {
    flex: 1 1 auto;
  }
}

@media (max-width: 430px) {
  .quiet-link {
    font-size: 12px;
  }

  .task-primary,
  .panel,
  .vote-surface,
  .results-surface,
  .dialog-body {
    padding: 16px;
  }

  .topic-option-copy > span {
    font-size: 12px;
  }

  .results-summary,
  .metric-strip,
  .completion-meta {
    grid-template-columns: 1fr;
  }

  .results-summary > div,
  .metric-strip > div,
  .completion-meta > div {
    border-right: 0 !important;
    border-top: 1px solid var(--border);
  }

  .results-summary > div:first-child,
  .metric-strip > div:first-child,
  .completion-meta > div:first-child {
    border-top: 0;
  }

  .dialog-actions {
    flex-direction: column-reverse;
  }

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

@media print {
  body {
    background: white;
  }

  .app-header,
  .admin-nav,
  .demo-notice,
  .page-heading .heading-actions,
  .toast-region,
  .confirm-dialog,
  .admin-workspace > :not(.page-heading):not(.results-surface) {
    display: none !important;
  }

  .admin-shell,
  .admin-workspace,
  .results-surface {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    display: block;
    box-shadow: none;
  }

  .result-row {
    break-inside: avoid;
  }
}

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