:root {
  color-scheme: light dark;
  --bg: #f4f4f1;
  --surface: #ffffff;
  --surface-2: #ecece8;
  --text: #11110f;
  --muted: #6e6e68;
  --line: #deded8;
  --line-strong: #c9c9c1;
  --inverse: #11110f;
  --inverse-text: #ffffff;
  --success: #277a50;
  --success-bg: #e7f3eb;
  --warning: #9a6711;
  --warning-bg: #fbf0d9;
  --danger: #aa3f36;
  --danger-bg: #f9e9e6;
  --shadow: 0 18px 60px rgba(16, 16, 14, 0.08);
  --radius: 14px;
  --font-sans: Inter, "Segoe UI", Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #11110f;
  --surface: #1a1a17;
  --surface-2: #242420;
  --text: #f6f6f0;
  --muted: #a8a8a0;
  --line: #33332e;
  --line-strong: #46463e;
  --inverse: #f4f4ef;
  --inverse-text: #11110f;
  --success: #6fc297;
  --success-bg: #173528;
  --warning: #e3b862;
  --warning-bg: #392c14;
  --danger: #e18a80;
  --danger-bg: #3e211f;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.25);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #11110f;
    --surface: #1a1a17;
    --surface-2: #242420;
    --text: #f6f6f0;
    --muted: #a8a8a0;
    --line: #33332e;
    --line-strong: #46463e;
    --inverse: #f4f4ef;
    --inverse-text: #11110f;
    --success: #6fc297;
    --success-bg: #173528;
    --warning: #e3b862;
    --warning-bg: #392c14;
    --danger: #e18a80;
    --danger-bg: #3e211f;
    --shadow: 0 18px 60px rgba(0, 0, 0, 0.25);
  }
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 13% 0%, color-mix(in srgb, var(--surface) 75%, transparent) 0, transparent 28rem),
    var(--bg);
}

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

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

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  min-height: 100vh;
}

.topbar {
  width: min(1440px, calc(100% - 64px));
  height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--inverse);
  color: var(--inverse-text);
  font-family: var(--font-serif);
  font-size: 19px;
  font-style: italic;
}

.topbar-actions,
.heading-actions,
.week-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: 9px;
}

.user-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.user-copy strong {
  font-size: 13px;
  font-weight: 600;
}

.user-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.avatar,
.mini-avatar {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface-2);
  font-size: 11px;
  font-weight: 700;
}

.avatar {
  width: 32px;
  height: 32px;
}

.avatar-large {
  width: 42px;
  height: 42px;
  font-size: 14px;
}

.mini-avatar {
  width: 22px;
  height: 22px;
  font-size: 8px;
}

.icon-button {
  width: 38px;
  height: 38px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  font-size: 17px;
  transition: border-color 150ms ease, transform 150ms ease, background 150ms ease;
}

.icon-button:hover {
  border-color: var(--text);
  transform: translateY(-1px);
}

.theme-icon {
  display: none;
}

:root:not([data-theme]) .theme-system {
  display: inline;
}

:root[data-theme="light"] .theme-light {
  display: inline;
}

:root[data-theme="dark"] .theme-dark {
  display: inline;
}

.button {
  min-height: 42px;
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  transition: transform 150ms ease, opacity 150ms ease, background 150ms ease, border-color 150ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

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

.button-primary,
.button-dark {
  border-color: var(--inverse);
  background: var(--inverse);
  color: var(--inverse-text);
}

.button-secondary {
  border-color: var(--line-strong);
  background: var(--surface);
}

.button-ghost {
  border-color: var(--line);
  background: transparent;
}

.button-small {
  min-height: 34px;
  padding: 0 13px;
  font-size: 11px;
}

.button-wide {
  width: 100%;
  min-height: 50px;
  justify-content: space-between;
  padding: 0 20px;
}

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

.eyebrow {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

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

h1 {
  margin-bottom: 14px;
  font-size: clamp(42px, 5vw, 70px);
  line-height: 0.95;
  letter-spacing: -0.055em;
}

h1 em,
h2 em {
  font-family: var(--font-serif);
  font-weight: 400;
}

h2 {
  margin-bottom: 4px;
  font-size: 24px;
  letter-spacing: -0.035em;
}

.dashboard {
  width: min(1300px, calc(100% - 64px));
  margin: 0 auto;
  padding: 64px 0 90px;
}

.dashboard-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 36px;
  margin-bottom: 40px;
}

.dashboard-heading h1 {
  font-size: clamp(42px, 5vw, 64px);
}

.dashboard-heading p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.stat-card {
  min-height: 150px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
}

.stat-card:last-child {
  border-right: 0;
}

.stat-card.accent {
  background: var(--inverse);
  color: var(--inverse-text);
}

.stat-label {
  margin-bottom: auto;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.accent .stat-label,
.accent small {
  color: color-mix(in srgb, var(--inverse-text) 63%, transparent);
}

.stat-card strong {
  margin: 14px 0 2px;
  font-family: var(--font-serif);
  font-size: 41px;
  font-weight: 400;
  line-height: 1;
}

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

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

.section-heading .eyebrow {
  margin-bottom: 8px;
}

.section-heading h2 {
  margin: 0;
}

.review-section,
.schedule-section,
.people-section {
  margin-top: 72px;
}

.count-badge {
  min-width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--warning-bg);
  color: var(--warning);
  font-size: 11px;
  font-weight: 700;
}

.review-list {
  border-top: 1px solid var(--line);
}

.review-card {
  min-height: 82px;
  padding: 16px 0;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}

.review-main {
  min-width: 180px;
  flex: 1;
}

.review-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.review-title strong {
  font-size: 14px;
}

.review-title span,
.review-main p {
  color: var(--muted);
  font-size: 11px;
}

.review-main p {
  margin: 5px 0 0;
}

.review-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.review-note {
  width: 150px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 11px;
  outline: none;
}

.week-board {
  display: grid;
  grid-template-columns: repeat(7, minmax(150px, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow-x: auto;
}

.day-column {
  min-height: 470px;
  border-right: 1px solid var(--line);
}

.day-column:last-child {
  border-right: 0;
}

.day-column.today {
  background: color-mix(in srgb, var(--surface-2) 45%, var(--surface));
}

.day-heading {
  height: 67px;
  padding: 14px 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}

.day-heading span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.day-heading strong {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 400;
}

.day-heading small {
  margin-left: auto;
  color: var(--danger);
  font-size: 8px;
  font-weight: 700;
}

.day-tasks {
  padding: 9px;
}

.task-card {
  position: relative;
  margin-bottom: 8px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.task-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(15, 15, 13, 0.08);
}

.task-card.status-approved {
  opacity: 0.7;
}

.task-card-top {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 9px;
}

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

.status-approved .status-dot,
.dot.success {
  background: var(--success);
}

.status-submitted .status-dot,
.dot.warning {
  background: var(--warning);
}

.status-rejected .status-dot,
.status-not_done .status-dot {
  background: var(--danger);
}

.dot.neutral {
  background: var(--muted);
}

.task-time {
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
}

.task-menu {
  margin-left: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
}

.popover {
  position: absolute;
  z-index: 4;
  top: 22px;
  right: -4px;
  display: none;
  width: 120px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.popover.open {
  display: block;
}

.popover button {
  width: 100%;
  padding: 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--danger);
  font-size: 10px;
  text-align: left;
}

.popover button:hover {
  background: var(--danger-bg);
}

.task-title {
  display: block;
  font-size: 12px;
  line-height: 1.35;
}

.task-description {
  margin: 5px 0 0;
  color: var(--muted);
  display: -webkit-box;
  overflow: hidden;
  font-size: 9px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.task-meta {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 9px;
}

.meta-separator {
  color: var(--line-strong);
}

.status-pill {
  width: fit-content;
  margin-top: 10px;
  padding: 4px 7px;
  display: block;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.status-pill.success {
  background: var(--success-bg);
  color: var(--success);
}

.status-pill.warning {
  background: var(--warning-bg);
  color: var(--warning);
}

.status-pill.danger {
  background: var(--danger-bg);
  color: var(--danger);
}

.empty-day {
  width: 100%;
  min-height: 64px;
  border: 1px dashed var(--line);
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  opacity: 0;
  transition: opacity 150ms ease, border-color 150ms ease;
}

.day-column:hover .empty-day {
  opacity: 1;
}

.empty-day:hover {
  border-color: var(--text);
  color: var(--text);
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.person-card {
  position: relative;
  min-height: 88px;
  padding: 17px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.person-admin {
  border-style: dashed;
}

.person-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.person-info strong {
  font-size: 13px;
}

.person-info small {
  color: var(--muted);
  font-size: 9px;
}

.access-badge {
  margin-left: auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.delete-user-button {
  width: 24px;
  height: 24px;
  margin-left: 3px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  transition: background 150ms ease, color 150ms ease;
}

.delete-user-button:hover {
  background: var(--danger-bg);
  color: var(--danger);
}

.person-progress {
  width: 70px;
  margin-left: auto;
  color: var(--muted);
  font-size: 9px;
  text-align: right;
}

.progress {
  height: 3px;
  margin-top: 7px;
  border-radius: 4px;
  background: var(--surface-2);
  overflow: hidden;
}

.progress i {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--success);
}

.empty-state {
  grid-column: 1 / -1;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

.empty-state > span {
  color: var(--line-strong);
  font-family: var(--font-serif);
  font-size: 30px;
}

.empty-state div {
  flex: 1;
}

.empty-state strong {
  font-size: 13px;
}

.empty-state p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.modal {
  width: min(590px, calc(100% - 30px));
  max-height: calc(100vh - 30px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.modal::backdrop {
  background: rgba(8, 8, 7, 0.56);
  backdrop-filter: blur(4px);
}

.modal-card {
  padding: 30px;
}

.modal-card-wide {
  width: 100%;
}

.modal-heading {
  margin-bottom: 26px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.modal-heading .eyebrow {
  margin-bottom: 7px;
}

.modal-heading p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.modal-heading .icon-button {
  flex: 0 0 auto;
}

.modal-empty {
  padding: 20px 0 5px;
  text-align: center;
}

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

.stack-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.stack-form label,
.field-label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.optional {
  margin-left: 4px;
  font-size: 8px;
  font-weight: 400;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

input,
select {
  height: 44px;
  padding: 0 13px;
}

textarea {
  padding: 12px 13px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--text);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--text) 9%, transparent);
}

input::placeholder,
textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 58%, transparent);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.form-row.three {
  grid-template-columns: 1.3fr 0.8fr 0.9fr;
}

.recurrence-fieldset {
  padding: 0;
  border: 0;
}

.access-fieldset {
  padding: 0;
  border: 0;
}

.access-fieldset legend {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.access-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}

.access-options label {
  display: block;
}

.access-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.access-options span {
  min-height: 70px;
  padding: 13px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
}

.access-options strong {
  color: var(--text);
  font-size: 11px;
}

.access-options small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.access-options input:checked + span {
  border-color: var(--text);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--text) 8%, transparent);
}

.recurrence-fieldset legend {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}

.segmented label {
  display: block;
}

.segmented input,
.weekday-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.segmented span {
  min-height: 34px;
  padding: 0 7px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}

.segmented input:checked + span {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.weekday-picker {
  display: flex;
  gap: 7px;
}

.weekday-picker span {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  cursor: pointer;
}

.weekday-picker input:checked + span {
  border-color: var(--inverse);
  background: var(--inverse);
  color: var(--inverse-text);
}

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

.toast-stack {
  position: fixed;
  z-index: 20;
  top: 84px;
  right: 24px;
  width: min(370px, calc(100% - 32px));
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 13px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: toast-in 200ms ease-out;
}

.toast > span {
  width: 21px;
  height: 21px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
}

.toast-success > span {
  background: var(--success-bg);
  color: var(--success);
}

.toast-error > span {
  background: var(--danger-bg);
  color: var(--danger);
}

.toast p {
  flex: 1;
  margin: 0;
  font-size: 11px;
}

.toast button {
  border: 0;
  background: transparent;
  color: var(--muted);
}

.toast-leave {
  opacity: 0;
  transform: translateX(10px);
  transition: all 250ms ease;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}

.auth-layout {
  width: min(1180px, calc(100% - 64px));
  min-height: calc(100vh - 74px);
  margin: 0 auto;
  padding: 74px 0 90px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 12vw;
}

.auth-intro h1 {
  max-width: 680px;
}

.lede {
  max-width: 520px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.feature-list {
  max-width: 520px;
  margin-top: 52px;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.feature-list span {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.feature-list b {
  width: 36px;
  display: inline-block;
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 400;
}

.auth-card {
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-card.compact {
  padding-top: 42px;
  padding-bottom: 42px;
}

.auth-step {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-card h2 {
  margin-top: 10px;
  font-size: 29px;
}

.auth-card > div > p {
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 12px;
}

.privacy-note {
  margin-top: 18px;
  display: block;
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}

.house-status {
  margin-top: 50px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 11px;
}

.pulse {
  position: relative;
  width: 7px;
  height: 7px;
  display: inline-block;
  border-radius: 50%;
  background: var(--success);
}

.pulse::after {
  position: absolute;
  inset: -4px;
  border: 1px solid var(--success);
  border-radius: inherit;
  content: "";
  opacity: 0.35;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  50% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.member-dashboard {
  max-width: 1060px;
}

.member-heading {
  align-items: center;
}

.member-summary-ring {
  --progress: 0;
  width: 108px;
  height: 108px;
  flex: 0 0 auto;
  padding: 7px;
  border-radius: 50%;
  background: conic-gradient(var(--inverse) calc(var(--progress) * 1%), var(--surface-2) 0);
}

.member-summary-ring > div {
  width: 100%;
  height: 100%;
  display: grid;
  place-content: center;
  border-radius: 50%;
  background: var(--bg);
  text-align: center;
}

.member-summary-ring strong {
  font-family: var(--font-serif);
  font-size: 31px;
  font-weight: 400;
  line-height: 0.9;
}

.member-summary-ring span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
}

.member-stats {
  padding: 15px 0;
  display: flex;
  gap: 30px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.member-stats span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
}

.member-stats strong {
  color: var(--text);
}

.member-schedule {
  margin-top: 58px;
}

.member-days {
  border-top: 1px solid var(--line);
}

.member-day {
  display: grid;
  grid-template-columns: 92px 1fr;
  border-bottom: 1px solid var(--line);
}

.member-day.today {
  background: color-mix(in srgb, var(--surface) 50%, transparent);
}

.member-date {
  padding: 25px 12px 24px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-right: 1px solid var(--line);
}

.member-date span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.member-date strong {
  margin-top: 4px;
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 400;
}

.member-date small {
  margin-top: 7px;
  padding: 3px 6px;
  border-radius: 999px;
  background: var(--inverse);
  color: var(--inverse-text);
  font-size: 7px;
  font-weight: 700;
}

.member-task-list {
  padding: 15px 0 15px 20px;
}

.member-task {
  padding: 18px 0;
  display: grid;
  grid-template-columns: 32px 1fr;
  border-bottom: 1px solid var(--line);
}

.member-task:last-child {
  border-bottom: 0;
}

.member-task-status {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.check-circle {
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted);
  font-size: 9px;
}

.status-approved .check-circle {
  border-color: var(--success);
  background: var(--success);
  color: #fff;
}

.status-submitted .check-circle {
  border-color: var(--warning);
  color: var(--warning);
}

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

.member-task-heading {
  display: flex;
  justify-content: space-between;
  gap: 30px;
}

.member-task-heading .status-pill {
  margin-top: 0;
}

.member-task h3 {
  margin: 8px 0 0;
  font-size: 17px;
  letter-spacing: -0.025em;
}

.member-task-content > p {
  max-width: 620px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.task-deadline {
  min-width: 65px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.task-deadline span {
  color: var(--muted);
  font-size: 8px;
}

.task-deadline strong {
  margin-top: 3px;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 400;
}

.task-details {
  margin-top: 13px;
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 9px;
}

.feedback-note {
  margin-top: 14px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-left: 2px solid var(--danger);
  background: var(--danger-bg);
  font-size: 10px;
}

.feedback-note.quiet {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.feedback-note span {
  color: var(--muted);
}

.member-task-actions {
  margin-top: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.complete-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.complete-form input {
  width: 210px;
  height: 40px;
  font-size: 10px;
}

.waiting-message,
.approved-message {
  width: fit-content;
  margin-top: 15px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--warning-bg);
  color: var(--warning);
  font-size: 9px;
  font-weight: 600;
}

.waiting-message .pulse {
  width: 5px;
  height: 5px;
  margin-right: 5px;
  background: var(--warning);
}

.waiting-message .pulse::after {
  border-color: var(--warning);
}

.approved-message {
  background: var(--success-bg);
  color: var(--success);
}

.member-empty-day {
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
}

.member-empty-day span {
  color: var(--line-strong);
}

.member-empty-day p {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 16px;
  font-style: italic;
}

.error-page {
  min-height: calc(100vh - 74px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.error-page > span {
  color: var(--line-strong);
  font-family: var(--font-serif);
  font-size: 90px;
}

.error-page h1 {
  margin: -12px 0 10px;
  font-size: 36px;
}

.error-page p {
  max-width: 420px;
  margin-bottom: 25px;
  color: var(--muted);
}

@media (max-width: 1000px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-card:nth-child(2) {
    border-right: 0;
  }

  .stat-card:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

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

  .auth-layout {
    gap: 7vw;
  }

  .review-card {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .review-actions {
    width: 100%;
    padding-left: 56px;
  }

  .review-note {
    flex: 1;
  }
}

@media (max-width: 760px) {
  .topbar,
  .dashboard,
  .auth-layout {
    width: min(100% - 32px, 100%);
  }

  .topbar {
    height: 64px;
  }

  .user-copy {
    display: none;
  }

  .topbar-actions {
    gap: 6px;
  }

  .dashboard {
    padding: 44px 0 64px;
  }

  .dashboard-heading {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 30px;
  }

  .heading-actions {
    width: 100%;
  }

  .heading-actions .button {
    flex: 1;
  }

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

  .stat-card {
    min-height: 127px;
    padding: 18px;
  }

  .stat-card strong {
    font-size: 34px;
  }

  .review-section,
  .schedule-section,
  .people-section {
    margin-top: 52px;
  }

  .schedule-heading {
    align-items: center;
  }

  .week-board {
    margin-right: -16px;
    grid-template-columns: repeat(7, 160px);
    border-radius: 12px 0 0 12px;
  }

  .day-column {
    min-height: 390px;
  }

  .empty-day {
    opacity: 1;
  }

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

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

  .auth-layout {
    min-height: auto;
    padding: 52px 0 70px;
    grid-template-columns: 1fr;
    gap: 45px;
  }

  .auth-intro h1 {
    font-size: 49px;
  }

  .feature-list {
    margin-top: 32px;
  }

  .auth-card {
    padding: 25px;
  }

  .modal-card {
    padding: 24px 20px;
  }

  .form-row,
  .form-row.three {
    grid-template-columns: 1fr;
  }

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

  .member-heading {
    flex-direction: row;
  }

  .member-heading h1 {
    font-size: 43px;
  }

  .member-summary-ring {
    width: 88px;
    height: 88px;
  }

  .member-day {
    grid-template-columns: 62px 1fr;
  }

  .member-date {
    padding-right: 7px;
  }

  .member-task-list {
    padding-left: 14px;
  }

  .member-task {
    grid-template-columns: 25px 1fr;
  }

  .member-task-actions,
  .complete-form {
    align-items: stretch;
    flex-direction: column;
  }

  .complete-form input,
  .complete-form .button,
  .member-task-actions form,
  .member-task-actions .button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .brand > span:last-child {
    display: none;
  }

  .topbar .button-small {
    padding: 0 10px;
  }

  .dashboard-heading h1 {
    font-size: 42px;
  }

  .stats-grid {
    border-radius: 11px;
  }

  .stat-card {
    padding: 15px;
  }

  .review-actions {
    padding-left: 0;
    flex-wrap: wrap;
  }

  .review-note {
    width: 100%;
    flex-basis: 100%;
  }

  .section-heading {
    align-items: flex-start;
  }

  .section-heading h2 {
    font-size: 20px;
  }

  .people-section .section-heading {
    align-items: flex-end;
  }

  .member-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .member-summary-ring {
    display: none;
  }

  .member-stats {
    gap: 12px;
    justify-content: space-between;
  }

  .member-stats span {
    gap: 4px;
    font-size: 8px;
  }

  .member-schedule .schedule-heading {
    align-items: flex-end;
  }

  .member-task-heading {
    gap: 10px;
  }

  .member-task h3 {
    font-size: 15px;
  }
}

@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;
  }
}
