:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  color: var(--text);
  background: #fff;
  --accent: #6945d4;
  --accent-hover: #5935bd;
  --text: #27272a;
  --secondary: #52525b;
  --muted: #6b6b73;
  --surface: #f5f5f6;
  --raised: #ededf0;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --line: #27272a14;
  --soft: #f5f5f6;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 13px; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button, select { cursor: pointer; }
a { color: var(--accent); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #a68bea;
  outline-offset: 3px;
}
[hidden] { display: none !important; }
p { margin: 0 0 12px; }
h1, h2, h3 { color: var(--text); }
h1 { font-size: 28px; line-height: 1.25; letter-spacing: 0; font-weight: 500; margin: 0 0 8px; }
h2 { font-size: 14px; font-weight: 600; letter-spacing: 0; margin: 0 0 4px; }
h3 { font-size: 13px; font-weight: 600; margin: 0 0 4px; }
.app-shell { display: grid; grid-template-columns: 216px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 28px 12px 24px;
  background: var(--surface);
  border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; font-size: 17px; font-weight: 600; letter-spacing: 0; padding: 0 8px; margin-bottom: 36px; }
.brand img { display: block; width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 1px 3px #0000000d; }
.brand small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; letter-spacing: .1px; margin-top: 2px; }
.sidebar-label { color: var(--muted); font-size: 12px; font-weight: 600; padding: 0 12px; margin: 0 0 8px; }
nav { display: grid; gap: 4px; }
nav a { display: flex; align-items: center; gap: 8px; min-height: 36px; border-radius: 8px; padding: 8px 12px; color: var(--secondary); font-size: 13px; font-weight: 500; text-decoration: none; transition: background 140ms var(--ease); }
nav a:hover { background: var(--raised); }
nav a[aria-current="page"] { background: var(--raised); color: var(--accent); }
nav svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.sidebar-project { margin-top: 32px; }
.sidebar-project > div { display: flex; align-items: flex-start; gap: 8px; padding: 4px 12px; font-size: 12px; color: var(--secondary); }
.project-dot { width: 8px; height: 8px; border-radius: 4px; background: #9999a2; flex-shrink: 0; margin-top: 4px; }
.sidebar-project small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.sidebar-bottom { margin-top: auto; padding: 24px 12px 0; }
.local-tag { color: var(--secondary); font-size: 12px; border: 1px solid var(--line); border-radius: 4px; padding: 4px 8px; }
.sidebar-bottom p { font-size: 12px; line-height: 1.8; color: var(--muted); margin: 12px 0 0; }
.workspace { min-width: 0; }
.topbar { height: 64px; padding: 0 36px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); background: #fafafa; }
#page-title { color: var(--secondary); font-size: 12px; font-weight: 500; }
.viewer { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.viewer select { width: 136px; font-size: 12px; min-height: 28px; padding: 4px 8px; background: #fff; box-shadow: 0 1px 2px #0000000d; }
.content { max-width: 1280px; margin: 0 auto; padding: 40px 40px 20px; }
.project-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.eyebrow { font-size: 12px; color: var(--muted); margin: 0 0 8px; font-weight: 400; }
.eyebrow span { color: var(--muted); padding: 0 8px; }
.subtitle { color: var(--muted); font-size: 12px; margin: 0; }
.round-badge { display: inline-flex; align-items: center; gap: 8px; color: var(--secondary); font-size: 12px; white-space: nowrap; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fafafa; }
.round-badge > span { width: 4px; height: 4px; border-radius: 50%; background: #5f9d82; }
main:focus { outline: none; }
.stats { display: flex; gap: 36px; padding: 0 0 24px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.stat { display: flex; align-items: baseline; gap: 8px; }
.stat strong { font-size: 24px; font-weight: 600; letter-spacing: 0; color: var(--text); font-variant-numeric: tabular-nums; }
.stat small { font-size: 13px; font-weight: 400; color: var(--muted); }
.stat > span { font-size: 12px; color: var(--muted); }
.columns { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 32px; align-items: start; }
.stack { display: grid; gap: 28px; min-width: 0; }
.card { min-width: 0; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-heading h2, .card-heading p { margin: 0; }
.helper, .muted { color: var(--muted); }
.helper { font-size: 12px; line-height: 1.6; }
.count { display: inline-block; margin-left: 8px; font-size: 12px; color: var(--muted); font-weight: 400; }
.team-panel { border-left: 1px solid var(--line); padding-left: 24px; }
.member-row { display: flex; align-items: center; gap: 8px; padding: 12px 0; }
.avatar { display: inline-grid; place-items: center; flex-shrink: 0; width: 28px; height: 28px; background: #ede7fa; color: #7954be; border-radius: 50%; font-size: 12px; font-weight: 600; }
.avatar.tone-1 { background: #f7e8f0; color: #81395f; }
.avatar.tone-2 { background: #e1f0ec; color: #386653; }
.avatar.tone-3 { background: #fbefda; color: #77551c; }
.member-info { flex: 1; min-width: 0; }
.member-name { font-size: 13px; font-weight: 500; white-space: nowrap; }
.member-detail { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 2px; }
.member-total { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
progress { display: block; appearance: none; width: 100%; max-width: 104px; height: 4px; border: 0; background: #ebebee; border-radius: 4px; overflow: hidden; margin: 8px 0 0; }
progress::-webkit-progress-bar { background: #ebebee; }
progress::-webkit-progress-value { background: #9999a2; border-radius: 4px; }
progress::-moz-progress-bar { background: #9999a2; }
.team-note { color: var(--muted); font-size: 12px; line-height: 1.7; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 12px; }
.task-list { padding: 0; list-style: none; margin: 0; }
.task { min-height: 64px; display: grid; grid-template-columns: 18px minmax(0, 1fr) 128px; gap: 8px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.task label { font-size: 13px; overflow-wrap: anywhere; cursor: pointer; line-height: 1.5; }
.task.done label { color: var(--muted); text-decoration: line-through; text-decoration-color: #a1a1aa; }
.task input { appearance: none; width: 16px; height: 16px; margin: 0; border: 1.5px solid #86868e; border-radius: 4px; background: #fff; cursor: pointer; display: grid; place-content: center; }
.task input:checked { background: #777780; border-color: var(--line); }
.task input:checked::after { content: ''; width: 8px; height: 4px; border-left: 1.5px solid white; border-bottom: 1.5px solid white; transform: translateY(-1px) rotate(-45deg); }
.task select { font-size: 12px; min-height: 28px; padding: 4px 8px; border-color: transparent; color: var(--muted); background-color: transparent; }
.task select:hover, .task select:focus { border-color: var(--line); background-color: #fafafa; }
input[type="text"], input[type="email"], input[type="password"], select, textarea { border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--text); padding: 8px 12px; max-width: 100%; min-height: 36px; }
input::placeholder, textarea::placeholder { color: var(--muted); }
textarea { resize: vertical; width: 100%; min-height: 112px; line-height: 1.65; font-size: 12px; }
.field { display: block; font-size: 12px; font-weight: 500; color: var(--secondary); margin-bottom: 8px; }
.add-task { margin-top: 20px; }
.add-task-grid { display: grid; grid-template-columns: minmax(0, 1fr) 128px auto; gap: 8px; }
.add-task-grid input { width: 100%; font-size: 12px; }
.add-task-grid select { font-size: 12px; padding: 8px 8px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--accent); color: white; font-size: 12px; font-weight: 500; text-decoration: none; box-shadow: 0 1px 2px #0000000d; white-space: nowrap; transition: background 140ms var(--ease), border-color 140ms var(--ease); }
.button:hover { background: var(--accent-hover); }
.button.secondary { color: var(--secondary); background: #fff; border-color: var(--line); box-shadow: 0 1px 2px #0000000d; }
.button.secondary:hover { background: var(--surface); border-color: var(--line); }
.feedback-prompt { display: flex; justify-content: space-between; align-items: center; gap: 16px; border: 1px solid var(--line); background: #fafafa; border-radius: 8px; padding: 16px 20px; }
.feedback-prompt h3 { font-size: 12px; margin-bottom: 4px; }
.feedback-prompt p { font-size: 12px; color: var(--muted); margin: 0; }
.section-heading { border-bottom: 1px solid var(--line); padding-bottom: 20px; margin-bottom: 24px; }
.section-heading h2 { font-size: 17px; margin-bottom: 8px; }
.section-heading p { color: var(--muted); font-size: 12px; margin: 0; }
.recipient-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.recipient-line label { font-size: 12px; font-weight: 500; }
.recipient-line select { width: 164px; font-size: 12px; }
.rating { border: 0; border-bottom: 1px solid var(--line); padding: 20px 0; margin: 0; }
.rating legend { float: left; width: 100%; padding: 0; font-size: 12px; font-weight: 600; }
.rating .helper { clear: both; padding-top: 4px; margin-bottom: 12px; }
.rating-options { display: inline-flex; gap: 4px; background: var(--surface); border: 1px solid var(--line); padding: 4px; border-radius: 8px; }
.rating-choice { position: relative; cursor: pointer; }
.rating-choice input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.rating-choice span { display: grid; place-items: center; width: 44px; height: 32px; border: 1px solid transparent; border-radius: 4px; color: var(--muted); font-size: 12px; }
.rating-choice input:checked + span { color: var(--accent); background: #fff; border-color: var(--line); box-shadow: 0 1px 3px #0000000f; font-weight: 600; }
.rating-choice input:focus-visible + span { outline: 3px solid #a68bea; outline-offset: 2px; }
.rating-choice:hover span { background: var(--raised); }
.scale { display: flex; justify-content: space-between; max-width: 248px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.note-spacing { margin-top: 12px; }
.comment-field { margin-top: 20px; }
.form-footer { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.form-footer .helper { margin: 0; max-width: 300px; font-size: 12px; }
.columns > aside:not(.team-panel) { padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.work-item { font-size: 12px; padding: 12px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.work-item small { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.work-item small.complete { color: var(--muted); }
.callout .step-number { color: var(--muted); font-size: 12px; margin: 0 0 8px; }
.callout h2 { font-size: 15px; margin-bottom: 8px; }
.callout p { font-size: 12px; color: var(--muted); }
.callout .button { margin-top: 12px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; text-align: left; font-variant-numeric: tabular-nums; }
caption { text-align: left; font-size: 12px; color: var(--muted); margin-bottom: 12px; }
th { font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap; }
td, th { padding: 12px 12px; border-bottom: 1px solid var(--line); }
td:first-child, th:first-child { padding-left: 0; }
td:last-child, th:last-child { padding-right: 0; }
.table-name { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.table-name .avatar { width: 24px; height: 24px; font-size: 12px; }
.score { color: var(--secondary); font-weight: 600; }
.no-score { color: var(--muted); font-size: 12px; }
.feedback-note { padding: 12px 0; border-top: 1px solid var(--line); }
.feedback-note p { font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; margin: 8px 0 0; }
.feedback-note small { color: var(--muted); font-size: 12px; }
.empty { padding: 20px 0; color: var(--muted); font-size: 12px; margin: 0; }
footer { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 12px; display: flex; justify-content: space-between; align-items: center; gap: 16px; color: var(--muted); font-size: 12px; }
footer p { margin: 0; }
.status-dot { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: #9999a2; margin-right: 4px; }
.text-button { border: 0; background: none; color: var(--muted); padding: 4px 0; font-size: 12px; }
.text-button:hover { color: var(--accent); }
.toast { position: fixed; bottom: 24px; left: calc(50% + 108px); transform: translateX(-50%); max-width: calc(100vw - 40px); padding: 12px 20px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--secondary); box-shadow: 0 5px 24px #0000000f; font-size: 12px; z-index: 5; }
.notice { padding: 12px 16px; margin-bottom: 20px; font-size: 12px; border: 1px solid #e6d6b6; border-radius: 8px; background: #fff7e7; color: #715b35; }
.skip-link { position: fixed; top: -60px; left: 16px; z-index: 10; background: white; padding: 12px; }
.skip-link:focus { top: 12px; }
dialog { max-width: 412px; width: calc(100% - 40px); padding: 24px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); box-shadow: 0 18px 70px #00000026; }
dialog::backdrop { background: #18181b38; }
dialog h2 { font-size: 16px; }
dialog p { font-size: 12px; color: var(--muted); margin-top: 12px; }
.button-row { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; }
@media (min-width: 1500px) {
  .content { padding-top: 48px; }
  .columns { grid-template-columns: minmax(0, 1fr) 272px; gap: 40px; }
}
@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 192px minmax(0, 1fr); }
  .sidebar { padding-inline: 12px; }
  .brand { font-size: 16px; gap: 8px; }
  .content { padding: 32px 28px 20px; }
  .topbar { padding-inline: 28px; }
  .columns { grid-template-columns: minmax(0, 1fr) 224px; gap: 24px; }
  .team-panel { padding-left: 20px; }
  .member-row { gap: 8px; }
  .member-name { font-size: 13px; }
  .member-detail { display: none; }
  .stats { gap: 24px; }
  .stat { align-items: flex-start; flex-direction: column; gap: 1px; }
  .task { grid-template-columns: 18px minmax(0, 1fr) 112px; }
  .task select { max-width: 112px; }
  .add-task-grid { grid-template-columns: minmax(0, 1fr) 110px; }
  .add-task-grid .button { grid-column: 1 / -1; justify-self: start; }
  .toast { left: calc(50% + 95px); }
}
@media (max-width: 852px) {
  .columns { grid-template-columns: minmax(0, 1fr); }
  .team-panel { border: 0; border-top: 1px solid var(--line); padding: 24px 0 0; }
  .member-name { font-size: 13px; }
  .member-detail { display: inline; }
  .member-info progress { max-width: 140px; }
  .member-row { padding-block: 12px; }
  .project-heading { align-items: flex-start; flex-direction: column; gap: 16px; }
  h1 { font-size: 24px; }
}
@media (max-width: 600px) {
  .app-shell { display: block; }
  .sidebar { position: static; height: auto; padding: 16px 16px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { margin: 0 0 16px; font-size: 17px; padding: 0 4px; }
  .brand img { width: 32px; height: 32px; border-radius: 9px; }
  .brand small, .sidebar-label, .sidebar-project, .sidebar-bottom { display: none; }
  nav { display: flex; gap: 4px; }
  nav a { justify-content: center; gap: 4px; padding: 8px; flex: 1; white-space: nowrap; font-size: 11px; }
  nav svg { display: none; }
  .topbar { min-height: 52px; height: auto; padding: 12px 20px; }
  #page-title { font-size: 12px; }
  .viewer { gap: 4px; font-size: 11px; }
  .viewer select { width: 136px; font-size: 12px; }
  .content { padding: 28px 24px 20px; }
  .project-heading { margin-bottom: 24px; }
  h1 { font-size: 24px; }
  .stats { gap: 0; justify-content: space-between; padding-bottom: 20px; margin-bottom: 24px; }
  .stat { gap: 2px; }
  .stat strong { font-size: 20px; }
  .stat > span { font-size: 11px; }
  .task { padding-block: 12px; grid-template-columns: 18px minmax(0, 1fr) 112px; }
  .task label { font-size: 13px; }
  .task select { font-size: 12px; max-width: 112px; padding-inline: 4px; }
  .add-task-grid input { min-width: 0; }
  .feedback-prompt { padding: 16px 12px; gap: 12px; flex-wrap: wrap; }
  .feedback-prompt p { font-size: 12px; }
  .feedback-prompt .button { padding: 8px 8px; font-size: 12px; }
  .form-footer { align-items: flex-start; flex-direction: column; }
  .form-footer .button { align-self: flex-end; }
  .toast { left: 50%; width: max-content; }
  footer { align-items: flex-start; flex-wrap: wrap; gap: 8px; font-size: 11px; }
  .text-button { font-size: 12px; white-space: nowrap; }
}
@media (max-width: 360px) {
  .content { padding-inline: 16px; }
  nav svg { display: none; }
  .viewer label { display: none; }
  .feedback-prompt { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
.setup-mode nav, .setup-mode .sidebar-label, .setup-mode .sidebar-project,
.setup-mode .viewer, .setup-mode .project-heading, .setup-mode #reset { display: none; }
.team-settings { max-width: 640px; }
.setup-mode .team-settings { margin: 16px auto 48px; }
.setup-mode .section-heading h2 { font-size: 24px; font-weight: 500; }
.setup-fields { display: grid; gap: 20px; margin-bottom: 32px; }
.team-settings input { width: 100%; }
.team-settings .card-heading { flex-wrap: wrap; }
.member-field { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.member-field > div { flex: 1; min-width: 0; }
.member-field > button, .member-role { flex: 0 0 120px; text-align: right; }
.member-field > button, .member-role { align-self: flex-end; padding-block: 8px; }
button:disabled { cursor: default; opacity: .5; }
.membership-note { margin-top: 16px; }
.team-settings .form-footer { padding-top: 24px; margin-top: 24px; border-top: 1px solid var(--line); }
.sample-option { display: flex; gap: 12px; align-items: center; margin-top: 24px; }
.sample-option button { color: var(--accent); }
.account-actions { display: flex; align-items: center; justify-content: flex-end; gap: 16px; min-width: 0; font-size: 12px; }
#account-name { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-actions button { white-space: nowrap; }
.auth-panel { max-width: 440px; }
.auth-links { display: flex; justify-content: space-between; gap: 16px; font-size: 12px; }
.invite-panel { margin-top: 32px; border-top: 1px solid var(--line); padding-top: 24px; }
.join-panel { padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 28px; }
.member-name, .project-heading h1, .sidebar-project { overflow-wrap: anywhere; white-space: normal; }
.project-heading > div { min-width: 0; }
@media (max-width: 600px) {
  nav { flex-wrap: wrap; }
  nav a { flex: 1 1 40%; }
  .member-field > button, .member-role { flex-basis: 88px; }
}
