:root {
  /* Theme and legacy aliases consume the canonical tokens from styles.css. */
  --admin-bg: var(--ds-bg);
  --admin-surface: var(--ds-surface);
  --admin-surface-soft: var(--ds-surface-subtle);
  --admin-ink: var(--ds-text);
  --admin-muted: var(--ds-text-muted);
  --admin-line: var(--ds-border);
  --admin-line-strong: var(--ds-border-strong);
  --admin-primary: var(--ds-brand);
  --admin-primary-dark: var(--ds-brand-strong);
  --admin-primary-soft: var(--ds-brand-soft);
  --admin-success: var(--ds-success);
  --admin-danger: var(--ds-danger);
  --admin-warning: var(--ds-warning);
  --admin-radius: var(--ds-card-radius);
  --admin-shadow: var(--ds-shadow-surface);
  --bg: var(--admin-bg);
  --surface: var(--admin-surface);
  --surface-soft: var(--admin-surface-soft);
  --ink: var(--admin-ink);
  --muted: var(--admin-muted);
  --line: var(--admin-line);
  --line-strong: var(--admin-line-strong);
  --teal: var(--admin-primary);
  --teal-dark: var(--admin-primary-dark);
  --blue: var(--admin-primary);
  --green-soft: var(--admin-primary-soft);
  --blue-soft: var(--admin-primary-soft);
  --coral: var(--ds-danger);
  --amber: var(--ds-warning);
  --coral-soft: var(--ds-danger-soft);
  --shadow: var(--admin-shadow);
}

#page-timetable #timetableLearningView {
  margin-top: 18px;
}

#page-timetable .timetable-plan-workspace {
  display: block;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

#page-timetable .timetable-plan-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--ds-border);
  border-left: 4px solid var(--ds-brand);
  background: var(--ds-surface);
  padding: 22px 24px 20px;
}

#page-timetable .timetable-plan-hero-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

#page-timetable .timetable-plan-hero h2,
#page-timetable .timetable-plan-hero p {
  margin: 0;
}

#page-timetable .timetable-plan-hero h2 {
  color: var(--ds-text);
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: -0.03em;
}

#page-timetable .timetable-plan-hero p {
  max-width: 660px;
  color: var(--ds-text-secondary);
  font-size: 13px;
  line-height: 1.65;
}

#page-timetable .timetable-plan-hero-actions,
#page-timetable .timetable-plan-links,
#page-timetable .timetable-plan-inline-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

#page-timetable .timetable-plan-hero-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
}

#page-timetable .timetable-plan-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--ds-border);
  background: var(--ds-warning-soft);
  padding: 11px 16px;
  color: var(--ds-warning-strong, #9a6700);
  font-size: 13px;
}

#page-timetable .timetable-plan-notice span {
  color: var(--ds-text-secondary);
  text-align: right;
}

#page-timetable .timetable-plan-snapshot {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(250px, .9fr) minmax(180px, .65fr);
  border-bottom: 1px solid var(--ds-border);
  background: var(--ds-surface);
}

#page-timetable .timetable-plan-snapshot > * {
  min-width: 0;
  padding: 22px 24px;
}

#page-timetable .timetable-plan-snapshot > * + * {
  border-left: 1px solid var(--ds-border);
}

#page-timetable .timetable-plan-progress-block {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
}

#page-timetable .timetable-plan-progress-ring {
  display: grid;
  width: 82px;
  height: 82px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--ds-brand) calc(var(--learning-progress) * 1%), var(--ds-border) 0);
  color: var(--ds-brand-strong);
  position: relative;
}

#page-timetable .timetable-plan-progress-ring::after {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: var(--ds-surface);
  content: "";
}

#page-timetable .timetable-plan-progress-ring strong,
#page-timetable .timetable-plan-progress-ring span {
  position: relative;
  z-index: 1;
}

#page-timetable .timetable-plan-progress-ring strong {
  font-size: 19px;
  line-height: 1;
}

#page-timetable .timetable-plan-progress-ring span {
  margin-top: -22px;
  color: var(--ds-text-muted);
  font-size: 10px;
}

#page-timetable .timetable-plan-progress-block h3,
#page-timetable .timetable-plan-progress-block p,
#page-timetable .timetable-plan-next-action p {
  margin: 0;
}

#page-timetable .timetable-plan-progress-block h3 {
  margin-top: 3px;
  color: var(--ds-text);
  font-size: 18px;
  line-height: 1.35;
}

#page-timetable .timetable-plan-progress-block p,
#page-timetable .timetable-plan-next-action p {
  margin-top: 6px;
  color: var(--ds-text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

#page-timetable .timetable-plan-progress-line,
#page-timetable .timetable-plan-progress-line span {
  display: block;
  height: 5px;
  border-radius: 999px;
}

#page-timetable .timetable-plan-progress-line {
  max-width: 360px;
  margin-top: 13px;
  overflow: hidden;
  background: var(--ds-border);
}

#page-timetable .timetable-plan-progress-line span {
  background: var(--ds-brand);
}

#page-timetable .timetable-plan-next-action {
  display: grid;
  align-content: center;
  gap: 2px;
  background: var(--ds-brand-soft);
}

#page-timetable .timetable-plan-next-action strong {
  display: block;
  margin-top: 3px;
  color: var(--ds-brand-strong);
  font-size: 16px;
  line-height: 1.4;
}

#page-timetable .timetable-plan-next-action button,
#page-timetable .timetable-plan-inline-meta button {
  width: fit-content;
  min-height: auto;
  margin-top: 9px;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--ds-brand-strong);
  font-size: 12px;
  font-weight: 760;
}

#page-timetable .timetable-plan-next-action button:hover,
#page-timetable .timetable-plan-inline-meta button:hover {
  background: transparent;
  color: var(--ds-brand-pressed);
  text-decoration: underline;
}

#page-timetable .timetable-plan-facts {
  display: grid;
  align-content: center;
  gap: 13px;
}

#page-timetable .timetable-plan-facts span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--ds-border);
  padding-bottom: 10px;
}

#page-timetable .timetable-plan-facts span:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

#page-timetable .timetable-plan-facts strong {
  color: var(--ds-text);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

#page-timetable .timetable-plan-facts small {
  color: var(--ds-text-muted);
  font-size: 12px;
}

#page-timetable .timetable-plan-attention,
#page-timetable .timetable-plan-course-section,
#page-timetable .timetable-plan-task-section,
#page-timetable .timetable-plan-maintenance {
  border-bottom: 1px solid var(--ds-border);
  background: var(--ds-surface);
  padding: 20px 24px;
}

#page-timetable .timetable-plan-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

#page-timetable .timetable-plan-section-head > div:first-child {
  display: grid;
  gap: 3px;
}

#page-timetable .timetable-plan-section-head h3,
#page-timetable .timetable-plan-section-head p {
  margin: 0;
}

#page-timetable .timetable-plan-section-head h3 {
  color: var(--ds-text);
  font-size: 17px;
}

#page-timetable .timetable-plan-section-head p {
  margin-top: 4px;
  color: var(--ds-text-muted);
  font-size: 12px;
  line-height: 1.55;
}

#page-timetable .timetable-plan-section-head > span,
#page-timetable .timetable-plan-inline-meta > span {
  color: var(--ds-text-muted);
  font-size: 12px;
}

#page-timetable .timetable-plan-signal-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--ds-border);
  border-bottom: 1px solid var(--ds-border);
}

#page-timetable .timetable-plan-signal-list article {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: baseline;
  min-width: 0;
  border-right: 1px solid var(--ds-border);
  padding: 13px 16px 12px;
}

#page-timetable .timetable-plan-signal-list article:last-child {
  border-right: 0;
}

#page-timetable .timetable-plan-signal-list article > span {
  grid-row: 1 / 3;
  color: var(--ds-text-muted);
  font-size: 12px;
  font-weight: 760;
}

#page-timetable .timetable-plan-signal-list strong {
  color: var(--ds-text);
  font-size: 15px;
}

#page-timetable .timetable-plan-signal-list small {
  min-width: 0;
  overflow: hidden;
  color: var(--ds-text-secondary);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-timetable .timetable-plan-signal-list .is-risk {
  border-top: 2px solid var(--ds-danger);
}

#page-timetable .timetable-plan-signal-list .is-focus {
  border-top: 2px solid var(--ds-brand);
}

#page-timetable .timetable-plan-signal-list .is-clear {
  border-top: 2px solid var(--ds-border-strong);
}

#page-timetable .timetable-plan-week-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-top: 1px solid var(--ds-border);
  border-left: 1px solid var(--ds-border);
}

#page-timetable .timetable-plan-week-strip button {
  display: grid;
  min-width: 0;
  gap: 3px;
  border: 0;
  border-right: 1px solid var(--ds-border);
  border-bottom: 1px solid var(--ds-border);
  border-radius: 0;
  background: var(--ds-surface);
  padding: 10px 6px;
  color: var(--ds-text-muted);
  text-align: center;
}

#page-timetable .timetable-plan-week-strip button:hover,
#page-timetable .timetable-plan-week-strip button.is-selected {
  background: var(--ds-brand-soft);
  color: var(--ds-brand-strong);
}

#page-timetable .timetable-plan-week-strip button.is-today strong {
  color: var(--ds-brand-strong);
}

#page-timetable .timetable-plan-week-strip span,
#page-timetable .timetable-plan-week-strip small {
  font-size: 11px;
}

#page-timetable .timetable-plan-week-strip strong {
  color: var(--ds-text);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

#page-timetable .timetable-plan-course-list {
  margin-top: 14px;
}

#page-timetable .timetable-plan-course-list .annual-course-row {
  border-bottom: 1px solid var(--ds-border);
  background: transparent;
  padding: 12px 0;
}

#page-timetable .timetable-plan-course-list .annual-course-row:last-child {
  border-bottom: 0;
}

#page-timetable .timetable-plan-task-controls,
#page-timetable .timetable-plan-controls {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

#page-timetable .timetable-plan-controls label {
  display: grid;
  gap: 4px;
  color: var(--ds-text-muted);
  font-size: 11px;
  font-weight: 760;
}

#page-timetable .timetable-plan-controls input,
#page-timetable .timetable-plan-controls select {
  min-width: 150px;
  min-height: 36px;
  border-color: var(--ds-border);
  background: var(--ds-surface-subtle);
  font-size: 13px;
}

#page-timetable .timetable-plan-controls input:focus,
#page-timetable .timetable-plan-controls select:focus {
  border-color: var(--ds-brand);
  box-shadow: 0 0 0 3px var(--ds-brand-soft);
}

#page-timetable .timetable-plan-task-list {
  border-top: 1px solid var(--ds-border);
}

#page-timetable .timetable-plan-task-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  border-bottom: 1px solid var(--ds-border);
  padding: 14px 2px;
}

#page-timetable .timetable-plan-task-row:last-child {
  border-bottom: 0;
}

#page-timetable .timetable-plan-task-index {
  padding-top: 2px;
  color: var(--ds-text-faint);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

#page-timetable .timetable-plan-task-row > div {
  min-width: 0;
}

#page-timetable .timetable-plan-task-row strong {
  color: var(--ds-text);
  font-size: 14px;
}

#page-timetable .timetable-plan-task-row p,
#page-timetable .timetable-plan-task-row small {
  display: block;
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--ds-text-secondary);
  font-size: 12px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-timetable .timetable-plan-task-row small {
  color: var(--ds-text-muted);
}

#page-timetable .timetable-plan-priority {
  align-self: start;
  border: 1px solid var(--ds-border);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--ds-text-muted);
  font-size: 11px;
  white-space: nowrap;
}

#page-timetable .timetable-plan-priority.is-high {
  border-color: var(--ds-brand-border);
  background: var(--ds-brand-soft);
  color: var(--ds-brand-strong);
}

#page-timetable .timetable-plan-empty {
  display: grid;
  justify-items: start;
  gap: 6px;
  border-top: 1px solid var(--ds-border);
  background: var(--ds-surface-subtle);
  padding: 24px 18px;
}

#page-timetable .timetable-plan-empty strong {
  color: var(--ds-text);
  font-size: 15px;
}

#page-timetable .timetable-plan-empty p,
#page-timetable .timetable-plan-maintenance > p {
  margin: 0;
  color: var(--ds-text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

#page-timetable .timetable-plan-empty > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

#page-timetable .timetable-plan-maintenance {
  padding-top: 16px;
  padding-bottom: 16px;
}

#page-timetable .timetable-plan-maintenance summary {
  cursor: pointer;
  color: var(--ds-text-secondary);
  font-size: 13px;
  font-weight: 760;
}

#page-timetable .timetable-plan-maintenance > p {
  margin: 10px 0 14px;
}

#page-timetable .timetable-plan-links {
  background: var(--ds-surface);
  padding: 14px 24px;
}

#page-timetable .timetable-plan-links > span {
  margin-right: 4px;
  color: var(--ds-text-muted);
  font-size: 12px;
}

#page-timetable .timetable-plan-links button {
  min-height: 30px;
  border-color: transparent;
  background: transparent;
  padding: 4px 8px;
  color: var(--ds-brand-strong);
  font-size: 12px;
}

#page-timetable .timetable-plan-links button:hover {
  background: var(--ds-brand-soft);
}

@media (max-width: 960px) {
  #page-timetable .timetable-plan-snapshot {
    grid-template-columns: minmax(0, 1.25fr) minmax(220px, .75fr);
  }

  #page-timetable .timetable-plan-facts {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--ds-border);
  }

  #page-timetable .timetable-plan-facts span {
    display: grid;
    justify-items: start;
    gap: 2px;
    border-bottom: 0;
    border-right: 1px solid var(--ds-border);
    padding-bottom: 0;
    padding-right: 14px;
  }

  #page-timetable .timetable-plan-facts span:last-child {
    border-right: 0;
    padding-right: 0;
  }

  #page-timetable .timetable-plan-task-head {
    align-items: stretch;
    flex-direction: column;
  }

  #page-timetable .timetable-plan-controls {
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  #page-timetable .timetable-plan-hero,
  #page-timetable .timetable-plan-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  #page-timetable .timetable-plan-hero {
    padding: 18px 16px;
  }

  #page-timetable .timetable-plan-hero-actions,
  #page-timetable .timetable-plan-hero-actions button,
  #page-timetable .timetable-plan-controls,
  #page-timetable .timetable-plan-controls label,
  #page-timetable .timetable-plan-controls input,
  #page-timetable .timetable-plan-controls select {
    width: 100%;
  }

  #page-timetable .timetable-plan-snapshot {
    display: block;
  }

  #page-timetable .timetable-plan-snapshot > * {
    border-left: 0;
    border-bottom: 1px solid var(--ds-border);
    padding: 18px 16px;
  }

  #page-timetable .timetable-plan-snapshot > *:last-child {
    border-bottom: 0;
  }

  #page-timetable .timetable-plan-progress-block {
    grid-template-columns: auto minmax(0, 1fr);
  }

  #page-timetable .timetable-plan-attention,
  #page-timetable .timetable-plan-course-section,
  #page-timetable .timetable-plan-task-section,
  #page-timetable .timetable-plan-maintenance {
    padding: 18px 16px;
  }

  #page-timetable .timetable-plan-notice {
    align-items: flex-start;
    flex-direction: column;
    padding: 11px 16px;
  }

  #page-timetable .timetable-plan-notice span {
    text-align: left;
  }

  #page-timetable .timetable-plan-signal-list {
    grid-template-columns: 1fr;
  }

  #page-timetable .timetable-plan-signal-list article {
    border-right: 0;
    border-bottom: 1px solid var(--ds-border);
  }

  #page-timetable .timetable-plan-signal-list article:last-child {
    border-bottom: 0;
  }

  #page-timetable .timetable-plan-week-strip {
    overflow-x: auto;
    grid-template-columns: repeat(7, minmax(58px, 1fr));
  }

  #page-timetable .timetable-plan-task-row {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 10px;
  }

  #page-timetable .timetable-plan-priority {
    grid-column: 2;
    width: fit-content;
  }

  #page-timetable .timetable-plan-links {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 16px;
  }

  #page-timetable .timetable-plan-links > span {
    margin-right: 0;
  }
}

/* Timeline refinement: archive rhythm, quiet everyday entries, clear milestones. */
#page-timeline {
  --timeline-blue: var(--ds-brand);
  --timeline-soft: var(--ds-brand-soft);
  --timeline-line: var(--ds-border);
}

#page-timeline .timeline-overview {
  grid-template-columns: minmax(270px, 1.55fr) repeat(4, minmax(132px, 1fr));
  gap: 0;
  border-bottom: 1px solid var(--ds-border);
  border-top: 1px solid var(--ds-border);
}

#page-timeline .timeline-overview article {
  min-height: 106px;
  padding: 17px 18px;
  border: 0;
  border-right: 1px solid var(--ds-border);
  border-radius: 0;
  background: transparent;
}

#page-timeline .timeline-overview article:last-child {
  border-right: 0;
}

#page-timeline .timeline-overview .timeline-overview-main {
  border-left: 3px solid var(--ds-brand);
  background: var(--ds-brand-soft);
}

#page-timeline .timeline-overview .timeline-overview-current strong {
  color: var(--ds-brand-strong);
  font-size: 19px;
}

#page-timeline .timeline-overview strong {
  font-size: 25px;
}

#page-timeline .timeline-toolbar {
  grid-template-columns: minmax(220px, 1.8fr) repeat(6, minmax(108px, .75fr)) auto;
}

#page-timeline .timeline-viewbar {
  margin-top: 16px;
}

#page-timeline .timeline-year-section {
  border-color: var(--ds-border);
  background: #fbfcfe;
}

#page-timeline .timeline-date-group {
  padding-top: 16px;
}

#page-timeline .timeline-date-label time {
  font-variant-numeric: tabular-nums;
}

#page-timeline .timeline-event-card.importance-normal .timeline-event-content {
  padding: 11px 14px;
  border-color: transparent;
  border-radius: 10px;
  background: transparent;
}

#page-timeline .timeline-event-card.importance-normal .timeline-event-content h3 {
  margin: 7px 0 3px;
  font-size: 15px;
  line-height: 1.4;
}

#page-timeline .timeline-event-card.importance-normal .timeline-event-content > p {
  font-size: 13px;
  line-height: 1.5;
  -webkit-line-clamp: 1;
}

#page-timeline .timeline-event-card.importance-normal .timeline-event-content > footer {
  margin-top: 7px;
  padding-top: 0;
  border-top: 0;
}

#page-timeline .timeline-event-card.importance-important .timeline-event-content,
#page-timeline .timeline-event-card.importance-milestone .timeline-event-content {
  border-left: 3px solid var(--ds-brand);
}

#page-timeline .timeline-event-card.importance-milestone .timeline-event-content {
  background: var(--ds-brand-soft);
}

#page-timeline .timeline-event-expand {
  margin-top: 10px;
  border-top: 1px solid #edf0f5;
}

#page-timeline .timeline-event-expand > summary {
  width: fit-content;
  padding-top: 9px;
  cursor: pointer;
  color: var(--ds-brand-strong);
  font-size: 12px;
  font-weight: 760;
  list-style: none;
}

#page-timeline .timeline-event-expand > summary::-webkit-details-marker {
  display: none;
}

#page-timeline .timeline-event-expand > summary::before {
  content: "+";
  display: inline-block;
  margin-right: 5px;
  font-size: 14px;
}

#page-timeline .timeline-event-expand[open] > summary::before {
  content: "−";
}

#page-timeline .timeline-event-expand > div {
  padding-top: 8px;
}

#page-timeline .timeline-event-expand p {
  margin: 0;
  color: var(--ds-text-secondary);
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
}

#page-timeline .timeline-event-expand small {
  display: block;
  margin-top: 8px;
  color: var(--ds-text-muted);
  font-size: 12px;
}

#page-timeline .timeline-event-badges > span {
  background: #f3f4f7;
  color: var(--ds-text-muted);
}

#page-timeline .timeline-event-badges > span:first-child {
  background: var(--ds-brand-soft);
  color: var(--ds-brand-strong);
}

#page-timeline .timeline-event-card.importance-milestone .timeline-event-badges > span:nth-child(2) {
  background: var(--ds-brand);
  color: #fff;
}

#page-timeline .timeline-load-more {
  width: min(100%, 280px);
  min-height: 42px;
  margin: 4px auto 0;
  border-color: #d6daf0;
  background: #fff;
  color: var(--ds-brand-strong);
}

#page-timeline .timeline-detail-links .timeline-detail-link {
  border: 0;
  border-radius: 999px;
  background: var(--ds-brand-soft);
  color: var(--ds-brand-strong);
  cursor: pointer;
  font-size: 12px;
  padding: 5px 9px;
}

#page-timeline .timeline-detail-links .timeline-detail-link:hover,
#page-timeline .timeline-detail-links .timeline-detail-link:focus-visible {
  background: #e6e8ff;
}

@media (max-width: 1180px) {
  #page-timeline .timeline-toolbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #page-timeline .timeline-search-field {
    grid-column: span 2;
  }

  #page-timeline .timeline-overview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #page-timeline .timeline-overview article:nth-child(3n) {
    border-right: 0;
  }

  #page-timeline .timeline-overview article:nth-child(n + 4) {
    border-top: 1px solid var(--ds-border);
  }
}

@media (max-width: 768px) {
  #page-timeline .timeline-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #page-timeline .timeline-overview .timeline-overview-main {
    grid-column: 1 / -1;
  }

  #page-timeline .timeline-overview article {
    border-right: 1px solid var(--ds-border);
  }

  #page-timeline .timeline-overview article:nth-child(2n) {
    border-right: 0;
  }

  #page-timeline .timeline-overview article:last-child {
    border-right: 0;
  }

  #page-timeline .timeline-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #page-timeline .timeline-search-field {
    grid-column: 1 / -1;
  }

  #page-timeline .timeline-date-group {
    grid-template-columns: 1fr;
  }
}

/* Annual planning: domain switcher, summary, schedule, and workspace */
#page-annual .annual-planning-domain-switcher {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  width: min(100%, 820px);
  margin: 0 auto;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-card);
  background: var(--ds-surface-subtle);
  padding: 7px;
}

#page-annual .annual-planning-domain-switcher button {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 72px;
  align-content: center;
  gap: 3px;
  border: 1px solid transparent;
  border-radius: var(--ds-radius-nested);
  background: transparent;
  color: var(--ds-text-muted);
  padding: 11px 42px 11px 14px;
  text-align: left;
  box-shadow: none;
}

#page-annual .annual-planning-domain-switcher button:hover {
  background: var(--ds-surface);
  color: var(--ds-text-secondary);
}

#page-annual .annual-planning-domain-switcher button.active {
  border-color: var(--ds-brand-border);
  background: var(--ds-surface);
  color: var(--ds-text);
  box-shadow: var(--ds-shadow-surface);
}

#page-annual .annual-planning-domain-switcher span,
#page-annual .annual-planning-domain-switcher small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-annual .annual-planning-domain-switcher span {
  font-size: 14px;
  font-weight: 760;
}

#page-annual .annual-planning-domain-switcher small {
  color: var(--ds-text-muted);
  font-size: 12px;
}

#page-annual .annual-planning-domain-switcher b {
  position: absolute;
  top: 12px;
  right: 12px;
  color: var(--ds-text-faint);
  font-size: 12px;
}

#page-annual .annual-planning-domain-switcher button.active b {
  color: var(--ds-brand-strong);
}

#page-annual .annual-planning-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

#page-annual .annual-planning-summary-grid article {
  display: grid;
  min-width: 0;
  min-height: 112px;
  align-content: center;
  gap: 6px;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-card);
  background: var(--ds-surface);
  padding: 18px 20px;
  box-shadow: none;
}

#page-annual .annual-planning-summary-grid span,
#page-annual .annual-planning-summary-grid small {
  color: var(--ds-text-muted);
  font-size: 12px;
}

#page-annual .annual-planning-summary-grid strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ds-text);
  font-size: 24px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 820px) {
  #page-annual .annual-planning-domain-switcher {
    width: 100%;
  }

  #page-annual .annual-planning-domain-switcher button {
    min-height: 78px;
    padding-right: 14px;
  }

  #page-annual .annual-planning-domain-switcher b {
    position: static;
    justify-self: start;
  }
}

@media (max-width: 680px) {
  #page-annual .annual-planning-domain-switcher {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
  }

  #page-annual .annual-planning-domain-switcher button {
    flex: 0 0 min(82vw, 260px);
    scroll-snap-align: start;
  }

  #page-annual .annual-planning-summary-grid {
    gap: 10px;
  }

  #page-annual .annual-planning-summary-grid article {
    min-height: 104px;
    padding: 15px 16px;
  }

  #page-annual .annual-planning-summary-grid strong {
    font-size: 20px;
  }

}

@media (max-width: 480px) {
  #page-annual .annual-planning-summary-grid {
    grid-template-columns: 1fr;
  }

  #page-annual .annual-planning-summary-grid article {
    min-height: 96px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  #page-annual .annual-calendar-actions > button,
  #page-annual .annual-calendar-actions > .annual-calendar-month-picker {
    height: 42px !important;
    min-height: 42px !important;
  }
}

@media (max-width: 768px) {
  #page-annual .annual-calendar-actions > button,
  #page-annual .annual-calendar-actions > .annual-calendar-month-picker {
    height: 44px !important;
    min-height: 44px !important;
  }
}

@media (max-width: 430px) {
  #page-timeline .timeline-toolbar {
    grid-template-columns: 1fr;
  }

  #page-timeline .timeline-search-field {
    grid-column: auto;
  }

  #page-timeline .timeline-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #page-timeline .timeline-overview article {
    padding: 14px;
  }

  #page-timeline .timeline-overview article:nth-child(n + 3) {
    border-top: 1px solid var(--ds-border);
  }

  #page-timeline .timeline-overview article:nth-child(2n) {
    border-right: 0;
  }

  #page-timeline .timeline-event-content {
    padding: 13px;
  }
}

/* Inventory refinement: a calm catalogue with visible action states. */
#page-inventory .page-header-copy {
  max-width: 760px;
}

#page-inventory .inventory-stats {
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(130px, 1fr));
  gap: 0;
  border-top: 1px solid var(--ds-border);
  border-bottom: 1px solid var(--ds-border);
}

#page-inventory .inventory-stats .metric {
  min-height: 96px;
  padding: 16px 18px;
  border: 0;
  border-right: 1px solid var(--ds-border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#page-inventory .inventory-stats .metric:first-child {
  border-left: 3px solid var(--ds-brand);
  background: var(--ds-brand-soft);
}

#page-inventory .inventory-stats .metric:last-child {
  border-right: 0;
}

#page-inventory .inventory-stats .metric strong {
  margin: 4px 0 2px;
  font-size: 25px;
}

#page-inventory .inventory-layout {
  grid-template-columns: 216px minmax(0, 1fr);
  gap: 16px;
  margin-top: 18px;
}

#page-inventory .inventory-side,
#page-inventory .inventory-table-panel {
  border-radius: var(--ds-radius-card);
}

#page-inventory .inventory-side {
  padding: 16px;
}

#page-inventory .inventory-category-list {
  display: grid;
  gap: 3px;
  margin-top: 8px;
}

#page-inventory .inventory-category-row {
  border-bottom: 1px solid #eef0f5;
}

#page-inventory .inventory-category-main {
  width: 100%;
  min-height: 42px;
  justify-content: space-between;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ds-text-secondary);
  text-align: left;
}

#page-inventory .inventory-category-main:hover,
#page-inventory .inventory-category-main.active {
  background: var(--ds-brand-soft);
  color: var(--ds-brand-strong);
}

#page-inventory .inventory-category-main > span {
  color: var(--ds-text-muted);
  font-size: 12px;
}

#page-inventory .inventory-category-main.active > span {
  color: var(--ds-brand-strong);
}

#page-inventory .inventory-table-panel {
  min-width: 0;
  padding: 18px;
}

#page-inventory .inventory-toolbar {
  grid-template-columns: minmax(180px, 1fr) minmax(130px, .35fr) minmax(140px, .4fr) auto;
  gap: 8px;
  margin: 14px 0 12px;
  padding: 0;
  background: transparent;
}

#page-inventory .inventory-toolbar input,
#page-inventory .inventory-toolbar select,
#page-inventory .inventory-toolbar button {
  min-height: 40px;
  height: 40px;
  margin: 0;
}

#page-inventory .inventory-table-wrap {
  border-color: var(--ds-border);
  border-radius: 12px;
}

#page-inventory .inventory-table {
  width: 100%;
  min-width: 880px;
  table-layout: fixed;
}

#page-inventory .inventory-table th:nth-child(1) { width: 14%; }
#page-inventory .inventory-table th:nth-child(2) { width: 18%; }
#page-inventory .inventory-table th:nth-child(3) { width: 15%; }
#page-inventory .inventory-table th:nth-child(4) { width: 11%; }
#page-inventory .inventory-table th:nth-child(5) { width: 17%; }
#page-inventory .inventory-table th:nth-child(6) { width: 15%; }
#page-inventory .inventory-table th:nth-child(7) { width: 10%; }

#page-inventory .inventory-table th {
  background: var(--ds-surface-subtle);
  color: var(--ds-text-muted);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: .02em;
}

#page-inventory .inventory-table td {
  color: var(--ds-text-secondary);
  font-size: 13px;
  height: 76px;
  vertical-align: middle;
}

#page-inventory .inventory-table th:last-child,
#page-inventory .inventory-table td:last-child {
  padding-inline: 8px;
}

#page-inventory .inventory-table tbody tr:hover {
  background: #fbfcff;
}

#page-inventory .inventory-table td strong {
  color: var(--ds-text);
  font-size: 14px;
}

#page-inventory .inventory-table td small {
  display: block;
  margin-top: 3px;
  color: var(--ds-text-muted);
  font-size: 11px;
  line-height: 1.4;
}

#page-inventory .inventory-table td > button {
  min-height: 32px;
  padding: 4px 8px;
  border-color: transparent;
  background: transparent;
  color: var(--ds-brand-strong);
  font-size: 12px;
}

#page-inventory .inventory-table td > button:hover {
  background: var(--ds-brand-soft);
}

#page-inventory .inventory-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  white-space: nowrap;
}

#page-inventory .inventory-row-actions button {
  min-height: 32px;
  border: 0;
  background: transparent;
  padding: 4px 5px;
  color: var(--ds-brand-strong);
  font-size: 12px;
  box-shadow: none;
}

#page-inventory .inventory-row-actions button:hover {
  background: var(--ds-brand-soft);
}

#page-inventory .inventory-row-actions .danger-text {
  color: var(--ds-danger);
}

#page-inventory .inventory-row-actions .danger-text:hover {
  background: var(--ds-danger-soft);
}

#page-inventory .inventory-stock-cell,
#page-inventory .inventory-stock-editor {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 7px;
  min-width: 0;
}

#page-inventory .inventory-quantity-stepper output {
  min-width: 24px;
  color: var(--ds-text);
  font-size: 15px;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

#page-inventory .inventory-quantity-stepper {
  display: inline-grid;
  grid-template-columns: 32px minmax(24px, auto) 32px;
  align-items: center;
  gap: 8px;
}

#page-inventory .inventory-quantity-stepper button {
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border-color: var(--ds-border);
  border-radius: 8px;
  background: var(--ds-surface-subtle);
  color: var(--ds-text-secondary);
  font-size: 18px;
  line-height: 1;
  box-shadow: none;
}

#page-inventory .inventory-quantity-stepper button:hover:not(:disabled),
#page-inventory .inventory-quantity-stepper button:focus-visible {
  border-color: var(--ds-brand-border);
  background: var(--ds-brand-soft);
  color: var(--ds-brand-strong);
}

#page-inventory .inventory-quantity-stepper button:disabled {
  border-color: transparent;
  color: var(--ds-text-faint);
  opacity: .65;
}

#page-inventory .inventory-status-cell,
#page-inventory .inventory-status-editor {
  display: grid;
  min-height: 40px;
  align-content: center;
  justify-items: start;
  gap: 5px;
}

#page-inventory .inventory-status-editor {
  width: 100%;
}

#page-inventory .inventory-usage-status,
#page-inventory .stock-status {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 760;
  line-height: 1;
}

#page-inventory .inventory-usage-status.in-use {
  background: var(--ds-success-soft);
  color: var(--ds-success);
}

#page-inventory .inventory-usage-status.idle {
  background: #f2f3f6;
  color: var(--ds-text-muted);
}

#page-inventory .inventory-usage-status.lent {
  background: #eef4ff;
  color: #4269a8;
}

#page-inventory .inventory-usage-status.missing,
#page-inventory .inventory-usage-status.purchase {
  background: var(--ds-warning-soft);
  color: var(--ds-warning);
}

#page-inventory .inventory-handling-note {
  color: var(--ds-warning) !important;
  font-weight: 700;
}

#page-inventory .inventory-pagination {
  margin-top: 10px;
  border-color: var(--ds-border);
  background: var(--ds-surface-subtle);
}

.inventory-form-section {
  padding: 16px 0;
  border-top: 1px solid var(--ds-border);
}

.inventory-form-section:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.inventory-form-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.inventory-form-section-heading strong {
  color: var(--ds-text);
  font-size: 14px;
}

.inventory-form-section-heading span {
  color: var(--ds-text-muted);
  font-size: 12px;
}

@media (max-width: 1180px) {
  #page-inventory .inventory-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #page-inventory .inventory-stats .metric:nth-child(2n) {
    border-right: 0;
  }

  #page-inventory .inventory-stats .metric:nth-child(n + 3) {
    border-top: 1px solid var(--ds-border);
  }
}

@media (max-width: 768px) {
  #page-inventory .inventory-layout {
    grid-template-columns: 1fr;
  }

  #page-inventory .inventory-side {
    position: static;
  }

  #page-inventory .inventory-category-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #page-inventory .inventory-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  #page-inventory .inventory-toolbar .search-input {
    grid-column: 1 / -1;
  }

  #page-inventory .inventory-table {
    display: block;
    width: 100%;
    min-width: 0;
    border: 0;
  }

  #page-inventory .inventory-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  #page-inventory .inventory-table tbody {
    display: grid;
    gap: 10px;
  }

  #page-inventory .inventory-table tr {
    display: grid;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--ds-border);
    border-radius: 12px;
    background: var(--ds-surface);
  }

  #page-inventory .inventory-table td {
    display: grid;
    grid-template-columns: minmax(78px, 28%) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    border: 0;
    border-bottom: 1px solid #edf0f5;
    padding: 10px 12px;
  }

  #page-inventory .inventory-table td:last-child {
    border-bottom: 0;
  }

  #page-inventory .inventory-table td::before {
    content: attr(data-label);
    color: var(--ds-text-muted);
    font-size: 11px;
    font-weight: 760;
  }

  #page-inventory .inventory-table-wrap {
    overflow: visible;
    border: 0;
  }
}

#page-annual .annual-tabs,
#page-annual .annual-tabs[aria-label] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 900px) {
  #page-annual .annual-tabs,
  #page-annual .annual-tabs[aria-label] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  #page-annual .annual-tabs,
  #page-annual .annual-tabs[aria-label] {
    grid-template-columns: 1fr;
  }
}

#page-domain-plan .domain-plan-life-health-main {
  display: block;
  min-width: 0;
}

#page-domain-plan .annual-life-health-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

#page-domain-plan .annual-life-health-routine,
#page-domain-plan .annual-life-health-skincare {
  display: grid;
  min-width: 0;
  gap: 14px;
}

#page-domain-plan .annual-life-health-split > div > .panel,
#page-domain-plan .annual-life-health-skincare > .panel {
  min-width: 0;
  margin: 0;
  border-color: var(--ds-border);
  border-radius: var(--ds-radius-card);
  box-shadow: none;
}

#page-domain-plan .annual-life-routine-panel {
  padding: 20px 22px;
}

#page-domain-plan .annual-life-routine-panel .panel-head,
#page-domain-plan .annual-skincare-stage-panel .panel-head,
#page-domain-plan .annual-skincare-rule-panel .panel-head {
  align-items: flex-start;
  margin-bottom: 16px;
}

#page-domain-plan .annual-life-routine-panel .panel-head h2,
#page-domain-plan .annual-skincare-stage-panel .panel-head h2,
#page-domain-plan .annual-skincare-rule-panel .panel-head h2 {
  margin: 3px 0 0;
  font-size: 19px;
}

#page-domain-plan .annual-life-routine-panel .annual-schedule {
  border-top: 1px solid var(--ds-border);
  margin-top: 12px;
  padding-top: 12px;
}

#page-domain-plan .annual-life-routine-panel .annual-schedule-row {
  grid-template-columns: 74px minmax(0, 1fr);
  min-height: 66px;
  border-bottom: 1px solid var(--ds-border);
  padding: 11px 16px;
}

#page-domain-plan .annual-life-routine-panel .annual-schedule-row:last-child {
  border-bottom: 0;
}

#page-domain-plan .annual-life-routine-panel .annual-schedule-row > strong {
  color: var(--ds-brand-strong);
  font-size: 13px;
}

#page-domain-plan .annual-life-routine-panel .annual-schedule-row span {
  color: var(--ds-text);
  font-size: 13px;
}

#page-domain-plan .annual-life-routine-panel .annual-schedule-row small {
  margin-top: 3px;
  color: var(--ds-text-muted);
  line-height: 1.5;
}

#page-domain-plan .annual-skincare-stage-panel,
#page-domain-plan .annual-skincare-rule-panel {
  padding: 20px 22px;
}

#page-domain-plan .annual-skincare-stage-list {
  display: grid;
  border-top: 1px solid var(--ds-border);
}

#page-domain-plan .annual-skincare-stage-list > details {
  border-bottom: 1px solid var(--ds-border);
}

#page-domain-plan .annual-skincare-stage-list > details:last-child {
  border-bottom: 0;
}

#page-domain-plan .annual-skincare-stage-list > details > summary {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  cursor: pointer;
  list-style: none;
}

#page-domain-plan .annual-skincare-stage-list > details > summary::-webkit-details-marker {
  display: none;
}

#page-domain-plan .annual-skincare-stage-list > details > summary > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

#page-domain-plan .annual-skincare-stage-list > details > summary strong {
  color: var(--ds-text);
  font-size: 14px;
}

#page-domain-plan .annual-skincare-stage-list > details > summary span {
  overflow: hidden;
  color: var(--ds-text-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-domain-plan .annual-skincare-stage-list > details > summary b {
  color: var(--ds-text-muted);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

#page-domain-plan .annual-skincare-stage-list > details[open] > summary b {
  color: var(--ds-brand-strong);
}

#page-domain-plan .annual-skincare-stage-list > details > .annual-skincare-exec-table-wrap {
  padding: 0 0 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

#page-domain-plan .annual-skincare-exec-table {
  width: 100%;
  min-width: 560px;
  overflow: hidden;
  border: 1px solid var(--ds-border);
  border-collapse: separate;
  border-radius: 14px;
  border-spacing: 0;
  background: var(--ds-surface);
  table-layout: fixed;
}

#page-domain-plan .annual-skincare-exec-table th,
#page-domain-plan .annual-skincare-exec-table td {
  border: 0;
  border-right: 1px solid var(--ds-border);
  border-bottom: 1px solid var(--ds-border);
  padding: 10px 8px;
  vertical-align: middle;
}

#page-domain-plan .annual-skincare-exec-table tr > :last-child {
  border-right: 0;
}

#page-domain-plan .annual-skincare-exec-table tbody tr:last-child > * {
  border-bottom: 0;
}

#page-domain-plan .annual-skincare-exec-table thead th {
  background: var(--ds-surface-subtle);
  color: var(--ds-text-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  text-align: center;
  white-space: nowrap;
}

#page-domain-plan .annual-skincare-exec-table thead th:first-child,
#page-domain-plan .annual-skincare-exec-table tbody th {
  width: 58px;
}

#page-domain-plan .annual-skincare-exec-table tbody th {
  background: #f8f8ff;
  color: var(--ds-brand-strong);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}

#page-domain-plan .annual-skincare-exec-table td {
  color: var(--ds-text-secondary);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

#page-domain-plan .annual-skincare-exec-table td span {
  display: block;
  min-width: 0;
}

#page-domain-plan .annual-skincare-exec-table td small {
  display: block;
  margin-top: 4px;
  color: var(--ds-text-muted);
  font-size: 10px;
  font-weight: 700;
}

#page-domain-plan .annual-skincare-exec-table .annual-skincare-morning-row td {
  background: linear-gradient(180deg, #ffffff 0%, #fbfbff 100%);
  color: var(--ds-text);
  text-align: left;
}

#page-domain-plan .annual-skincare-rule-panel .annual-rule-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--ds-border);
}

#page-domain-plan .annual-skincare-rule-panel .annual-rule-list > span {
  border: 0;
  border-bottom: 1px solid var(--ds-border);
  border-radius: 0;
  background: transparent;
  padding: 11px 0;
  color: var(--ds-text-secondary);
  line-height: 1.55;
}

#page-domain-plan .annual-skincare-rule-panel .annual-rule-list > span:last-child {
  border-bottom: 0;
}

#page-domain-plan .annual-skincare-rule-panel .annual-empty-action {
  min-height: 92px;
  border: 0;
  padding: 16px 0 4px;
  background: transparent;
}

#page-domain-plan .annual-skincare-rule-panel .annual-empty-action strong {
  font-size: 13px;
}

#page-domain-plan .annual-skincare-rule-panel .annual-empty-action span {
  font-size: 11px;
}

#page-domain-plan .annual-skincare-rule-panel .annual-empty-action button {
  margin-top: 8px;
}

#page-domain-plan .annual-skincare-rule-panel .annual-skincare-rule-editor {
  border-top: 1px solid var(--ds-border);
  padding-top: 12px;
}

#page-domain-plan .annual-skincare-rule-panel .annual-skincare-rule-editor label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  margin: 0;
}

#page-domain-plan .annual-skincare-rule-panel .annual-skincare-rule-editor textarea {
  width: 100%;
  min-height: 56px;
  border-color: var(--ds-border);
  background: var(--ds-surface-subtle);
  font-size: 13px;
  line-height: 1.55;
}

#page-domain-plan .annual-skincare-rule-panel .annual-skincare-rule-editor > button {
  justify-self: start;
}

#page-domain-plan .domain-care-products-panel {
  overflow: hidden;
  padding: 0;
}

#page-domain-plan .domain-care-products-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 20px 22px 18px;
}

#page-domain-plan .domain-care-products-head h2 {
  font-size: 19px;
}

#page-domain-plan .domain-care-products-head > div.domain-care-products-actions {
  display: grid;
  min-width: 120px;
  align-content: start;
  justify-items: end;
  gap: 8px;
  border-left: 1px solid var(--ds-border);
  padding-left: 16px;
}

#page-domain-plan .domain-care-products-head > div.domain-care-products-actions > span {
  color: var(--ds-text-muted);
  font-size: 10px;
}

#page-domain-plan .domain-care-products-head > div.domain-care-products-actions > span strong {
  color: var(--ds-brand-strong);
  font-size: 15px;
}

#page-domain-plan .domain-care-products-actions button {
  min-height: 34px;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--ds-brand-strong);
  box-shadow: none;
  font-size: 11px;
}

#page-domain-plan .domain-care-products-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--ds-border);
}

#page-domain-plan .domain-care-product-row {
  display: grid;
  grid-template-areas: none;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  align-content: start;
  gap: 9px;
  border: 0;
  border-right: 1px solid var(--ds-border);
  border-bottom: 1px solid var(--ds-border);
  padding: 14px 16px;
  background: var(--ds-surface);
}

#page-domain-plan .domain-care-product-row:nth-child(2n) {
  border-right: 0;
}

#page-domain-plan .domain-care-product-row:nth-last-child(-n + 2) {
  border-bottom: 0;
}

#page-domain-plan .domain-care-product-category {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

#page-domain-plan .domain-care-product-category strong {
  font-size: 13px;
}

#page-domain-plan .domain-care-product-category small {
  font-size: 9px;
}

#page-domain-plan .domain-care-product-row > label {
  display: grid;
  min-width: 0;
  gap: 4px;
}

#page-domain-plan .domain-care-product-row > label > span,
#page-domain-plan .domain-care-product-links label > span {
  display: block;
  color: var(--ds-text-muted);
  font-size: 9px;
  font-weight: 700;
}

#page-domain-plan .domain-care-product-row input,
#page-domain-plan .domain-care-product-row select {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  border-color: var(--ds-border);
  background: var(--ds-surface);
  padding: 7px 9px;
  box-shadow: none;
  font-size: 11px;
}

#page-domain-plan .domain-care-product-links {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 8px;
}

#page-domain-plan .domain-care-product-links label {
  display: grid;
  min-width: 0;
  gap: 4px;
}

#page-domain-plan .domain-care-product-inventory-state {
  color: var(--ds-text-muted);
  font-size: 9px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

#page-domain-plan .domain-care-products-panel > footer {
  padding: 11px 18px;
}

@media (max-width: 1100px) {
  #page-domain-plan .annual-life-health-split {
    grid-template-columns: minmax(0, 1fr);
  }

  #page-domain-plan .annual-life-health-routine,
  #page-domain-plan .annual-life-health-skincare {
    gap: 12px;
  }
}

@media (max-width: 700px) {
  #page-domain-plan .annual-life-routine-panel,
  #page-domain-plan .annual-skincare-stage-panel,
  #page-domain-plan .annual-skincare-rule-panel {
    padding: 16px;
  }

  #page-domain-plan .domain-care-products-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  #page-domain-plan .annual-skincare-stage-list > details > summary {
    min-height: 58px;
    align-items: flex-start;
    padding: 11px 0;
  }

  #page-domain-plan .annual-skincare-exec-table {
    min-width: 0;
  }

  #page-domain-plan .annual-skincare-exec-table,
  #page-domain-plan .annual-skincare-exec-table thead,
  #page-domain-plan .annual-skincare-exec-table tbody,
  #page-domain-plan .annual-skincare-exec-table tr,
  #page-domain-plan .annual-skincare-exec-table th,
  #page-domain-plan .annual-skincare-exec-table td {
    display: block;
  }

  #page-domain-plan .annual-skincare-exec-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  #page-domain-plan .annual-skincare-exec-table tbody th {
    width: 100%;
    border-right: 0;
    padding: 10px 12px;
    text-align: left;
  }

  #page-domain-plan .annual-skincare-exec-table td {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 10px;
    border-right: 0;
    padding: 10px 12px;
  }

  #page-domain-plan .annual-skincare-exec-table td::before {
    content: attr(data-label);
    color: var(--ds-text-muted);
    font-size: 11px;
    font-weight: 800;
  }

  #page-domain-plan .domain-care-product-row,
  #page-domain-plan .domain-care-product-row:nth-child(2n),
  #page-domain-plan .domain-care-product-row:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--ds-border);
  }

  #page-domain-plan .domain-care-product-row:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 430px) {
  #page-domain-plan .domain-care-products-head {
    grid-template-columns: minmax(0, 1fr);
    padding: 16px;
  }

  #page-domain-plan .domain-care-products-head > div.domain-care-products-actions {
    min-width: 0;
    justify-items: start;
    border-top: 1px solid var(--ds-border);
    border-left: 0;
    padding-top: 10px;
    padding-left: 0;
  }

  #page-domain-plan .domain-care-product-links {
    grid-template-columns: minmax(0, 1fr);
  }

  #page-domain-plan .annual-life-routine-panel .annual-schedule-row {
    grid-template-columns: 64px minmax(0, 1fr);
  }
}

/* Standalone domain planning module */
#page-domain-plan {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px 36px;
}

#page-domain-plan .domain-plan-page-heading {
  min-height: 0;
  margin-bottom: 18px;
  padding-top: 24px;
}

#page-domain-plan .domain-plan-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 24px;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-card);
  background: var(--ds-surface-subtle);
  padding: 7px;
}

#page-domain-plan .domain-plan-tabs button {
  display: grid;
  min-width: 0;
  min-height: 66px;
  align-content: center;
  gap: 3px;
  border: 1px solid transparent;
  border-radius: var(--ds-radius-nested);
  background: transparent;
  color: var(--ds-text-muted);
  padding: 10px 14px;
  text-align: left;
  box-shadow: none;
}

#page-domain-plan .domain-plan-tabs button:hover,
#page-domain-plan .domain-plan-tabs button:focus-visible {
  background: var(--ds-surface);
  color: var(--ds-text-secondary);
}

#page-domain-plan .domain-plan-tabs button.active {
  border-color: var(--ds-brand-border);
  background: var(--ds-surface);
  color: var(--ds-brand-strong);
  box-shadow: var(--ds-shadow-surface);
}

#page-domain-plan .domain-plan-tabs strong,
#page-domain-plan .domain-plan-tabs small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-domain-plan .domain-plan-tabs strong {
  color: inherit;
  font-size: 14px;
}

#page-domain-plan .domain-plan-tabs small {
  color: var(--ds-text-muted);
  font-size: 12px;
}

#page-domain-plan .domain-plan-content,
#page-domain-plan .domain-plan-home,
#page-domain-plan .domain-plan-workspace {
  display: grid;
  min-width: 0;
  gap: 20px;
}

#page-domain-plan .panel {
  position: relative;
  border-color: var(--ds-border);
  border-radius: var(--ds-radius-surface);
  box-shadow: none;
}

#page-domain-plan .panel > .annual-edit-toolbar {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 3;
  margin: 0;
}

#page-domain-plan .panel:has(> .annual-edit-toolbar) > .panel-head {
  padding-right: 64px;
}

#page-domain-plan .annual-edit-toolbar {
  display: flex;
  min-height: 32px;
  align-items: center;
  justify-content: flex-end;
  margin: 0 0 8px;
}

#page-domain-plan .annual-inline-edit {
  width: 50px;
  min-width: 50px;
  height: 32px;
  min-height: 32px;
  border: 1px solid var(--ds-border);
  border-radius: 9px;
  background: var(--ds-surface);
  color: var(--ds-text-muted);
  padding: 0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  box-shadow: none;
}

#page-domain-plan .annual-inline-edit:hover,
#page-domain-plan .annual-inline-edit:focus-visible {
  border-color: var(--ds-brand-border);
  background: var(--ds-brand-soft);
  color: var(--ds-brand-strong);
}

#page-domain-plan .annual-inline-edit.is-active {
  border-color: var(--ds-brand-border);
  background: var(--ds-brand-soft);
  color: var(--ds-brand-strong);
  box-shadow: none;
}

#page-domain-plan .annual-edit-table-wrap {
  margin: 0;
}

#page-domain-plan .annual-edit-table {
  width: 100%;
  min-width: 760px;
}

#page-domain-plan .annual-edit-table th:last-child,
#page-domain-plan .annual-edit-table td:last-child {
  width: 86px;
  text-align: center;
  white-space: nowrap;
}

#page-domain-plan .annual-edit-table :is(input, select, textarea) {
  min-height: 36px;
  font-size: 12px;
}

#page-domain-plan .annual-edit-table button.danger {
  display: inline-flex;
  width: auto;
  min-width: 58px;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  line-height: 1;
  white-space: nowrap;
}

#page-domain-plan .annual-edit-table textarea {
  height: 36px;
  resize: vertical;
}

#page-domain-plan .annual-edit-table-wrap:is(
  [data-annual-edit-path="finance.assets"],
  [data-annual-edit-path="finance.priorities"]
) {
  overflow-x: hidden;
}

#page-domain-plan .annual-edit-table-wrap:is(
  [data-annual-edit-path="finance.assets"],
  [data-annual-edit-path="finance.priorities"]
) .annual-edit-table {
  min-width: 0;
  table-layout: fixed;
}

#page-domain-plan .annual-edit-table-wrap[data-annual-edit-path="finance.assets"] .annual-edit-table th:nth-child(1) {
  width: 22%;
}

#page-domain-plan .annual-edit-table-wrap[data-annual-edit-path="finance.assets"] .annual-edit-table th:nth-child(2) {
  width: 18%;
}

#page-domain-plan .annual-edit-table-wrap[data-annual-edit-path="finance.assets"] .annual-edit-table th:nth-child(3) {
  width: 28%;
}

#page-domain-plan .annual-edit-table-wrap[data-annual-edit-path="finance.assets"] .annual-edit-table th:nth-child(4) {
  width: auto;
}

#page-domain-plan .annual-edit-table-wrap:is(
  [data-annual-edit-path="finance.assets"],
  [data-annual-edit-path="finance.priorities"]
) .annual-edit-table :is(input, select, textarea) {
  width: 100%;
  min-width: 0;
}

#page-domain-plan .annual-edit-table-wrap:is(
  [data-annual-edit-path="finance.assets"],
  [data-annual-edit-path="finance.priorities"]
) .annual-edit-table textarea {
  min-width: 0;
}

#page-domain-plan .annual-edit-table-wrap:is(
  [data-annual-edit-path="finance.assets"],
  [data-annual-edit-path="finance.priorities"]
) > button {
  margin-left: 12px;
}

#page-domain-plan .annual-board-kicker {
  color: var(--ds-brand-strong);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}

#page-domain-plan .domain-plan-calendar-panel {
  padding: 24px;
}

#page-domain-plan .domain-plan-calendar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

#page-domain-plan .domain-plan-calendar-head h2 {
  margin: 4px 0 0;
  color: var(--ds-text);
  font-size: var(--ds-font-size-section-title);
}

#page-domain-plan .domain-plan-calendar-head p {
  margin: 6px 0 0;
  color: var(--ds-text-muted);
  font-size: 13px;
  line-height: 1.55;
}

#page-domain-plan .domain-plan-month-nav {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

#page-domain-plan .domain-plan-month-nav button {
  width: 38px;
  min-height: 38px;
  padding: 0;
}

#page-domain-plan .domain-plan-month-nav strong {
  min-width: 112px;
  color: var(--ds-text-secondary);
  font-size: 13px;
  text-align: center;
}

#page-domain-plan .domain-plan-calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(290px, .72fr);
  overflow: hidden;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-nested);
}

#page-domain-plan .domain-plan-calendar-main {
  min-width: 0;
  background: var(--ds-surface);
}

#page-domain-plan .domain-plan-weekdays,
#page-domain-plan .domain-plan-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

#page-domain-plan .domain-plan-weekdays {
  border-bottom: 1px solid var(--ds-border);
  background: var(--ds-surface-subtle);
}

#page-domain-plan .domain-plan-weekdays span {
  padding: 10px 4px;
  color: var(--ds-text-muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

#page-domain-plan .domain-plan-days {
  background: var(--ds-border);
  gap: 1px;
}

#page-domain-plan .domain-plan-days > i,
#page-domain-plan .domain-plan-days > button {
  min-width: 0;
  min-height: 92px;
  border: 0;
  border-radius: 0;
  background: var(--ds-surface);
  padding: 10px;
  box-shadow: none;
}

#page-domain-plan .domain-plan-days > i {
  display: block;
  background: var(--ds-surface-subtle);
}

#page-domain-plan .domain-plan-days > button {
  position: relative;
  display: grid;
  align-content: space-between;
  justify-items: start;
  gap: 6px;
  color: var(--ds-text-secondary);
  text-align: left;
}

#page-domain-plan .domain-plan-days > button:hover,
#page-domain-plan .domain-plan-days > button:focus-visible {
  z-index: 1;
  background: var(--ds-surface-subtle);
}

#page-domain-plan .domain-plan-days > button.selected {
  z-index: 2;
  box-shadow: inset 0 0 0 2px var(--ds-brand);
}

#page-domain-plan .domain-plan-days > button.today > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--ds-brand);
  color: #fff;
}

#page-domain-plan .domain-plan-days > button.complete {
  background: color-mix(in srgb, var(--ds-success) 7%, var(--ds-surface));
}

#page-domain-plan .domain-plan-days > button.overdue {
  background: color-mix(in srgb, var(--ds-danger) 6%, var(--ds-surface));
}

#page-domain-plan .domain-plan-days > button > span {
  font-size: 13px;
  font-weight: 800;
}

#page-domain-plan .domain-plan-days > button > b {
  display: flex;
  gap: 4px;
}

#page-domain-plan .domain-plan-days > button > b i {
  width: 16px;
  height: 3px;
  border-radius: 999px;
  background: var(--ds-brand);
}

#page-domain-plan .domain-plan-days > button > b i.training-nutrition {
  background: #e77716;
}

#page-domain-plan .domain-plan-days > button > b i.life-health {
  background: var(--ds-success);
}

#page-domain-plan .domain-plan-days > button > b i.finance-debt {
  background: var(--ds-brand);
}

#page-domain-plan .domain-plan-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  border-top: 1px solid var(--ds-border);
  padding: 11px 12px;
  color: var(--ds-text-muted);
  font-size: 11px;
}

#page-domain-plan .domain-plan-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

#page-domain-plan .domain-plan-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ds-border-strong);
}

#page-domain-plan .domain-plan-legend i.complete { background: var(--ds-success); }
#page-domain-plan .domain-plan-legend i.partial { background: var(--ds-warning); }
#page-domain-plan .domain-plan-legend i.overdue { background: var(--ds-danger); }
#page-domain-plan .domain-plan-legend i.pending { background: var(--ds-brand); }

#page-domain-plan .domain-plan-day-panel {
  display: grid;
  min-width: 0;
  align-content: start;
  border-left: 1px solid var(--ds-border);
  background: var(--ds-surface-subtle);
}

#page-domain-plan .domain-plan-day-panel > header,
#page-domain-plan .domain-plan-day-panel > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
}

#page-domain-plan .domain-plan-day-panel > header {
  border-bottom: 1px solid var(--ds-border);
}

#page-domain-plan .domain-plan-day-panel > header div {
  display: grid;
  gap: 3px;
}

#page-domain-plan .domain-plan-day-panel > header span,
#page-domain-plan .domain-plan-day-panel > footer span {
  color: var(--ds-text-muted);
  font-size: 11px;
}

#page-domain-plan .domain-plan-day-panel > header strong {
  color: var(--ds-text);
  font-size: 15px;
}

#page-domain-plan .domain-plan-day-panel > header > b {
  color: var(--ds-brand-strong);
  font-size: 20px;
}

#page-domain-plan .domain-plan-day-panel > header > b.complete {
  color: var(--ds-success);
}

#page-domain-plan .domain-plan-day-panel > header > b.partial {
  color: var(--ds-warning);
}

#page-domain-plan .domain-plan-day-groups {
  display: grid;
  min-height: 260px;
  align-content: start;
  padding: 8px 18px;
}

#page-domain-plan .domain-plan-day-groups > section + section {
  border-top: 1px solid var(--ds-border);
}

#page-domain-plan .domain-plan-day-groups > section {
  display: grid;
  gap: 2px;
  padding: 12px 0;
}

#page-domain-plan .domain-plan-day-groups > section > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--ds-text-muted);
  font-size: 11px;
}

#page-domain-plan .domain-plan-day-groups article {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 9px;
  padding: 9px 0;
}

#page-domain-plan .domain-plan-day-groups article.done p {
  opacity: .58;
}

#page-domain-plan .domain-plan-day-groups article > button {
  width: 30px;
  min-height: 30px;
  border-radius: 50%;
  padding: 0;
}

#page-domain-plan .domain-plan-day-groups article > button:first-child {
  border-color: var(--ds-brand-border);
  color: var(--ds-brand-strong);
}

#page-domain-plan .domain-plan-day-groups article p {
  display: grid;
  min-width: 0;
  gap: 2px;
  margin: 0;
}

#page-domain-plan .domain-plan-day-groups article p strong,
#page-domain-plan .domain-plan-day-groups article p small {
  overflow-wrap: anywhere;
}

#page-domain-plan .domain-plan-day-groups article p strong {
  color: var(--ds-text-secondary);
  font-size: 13px;
}

#page-domain-plan .domain-plan-day-groups article p small {
  color: var(--ds-text-muted);
  font-size: 11px;
}

#page-domain-plan .domain-plan-complete-all {
  margin: 8px 18px;
  border-color: var(--ds-brand-border);
  color: var(--ds-brand-strong);
}

#page-domain-plan .domain-plan-day-empty {
  display: grid;
  min-height: 150px;
  place-content: center;
  gap: 6px;
  color: var(--ds-text-muted);
  text-align: center;
}

#page-domain-plan .domain-plan-day-empty strong {
  color: var(--ds-text-secondary);
  font-size: 14px;
}

#page-domain-plan .domain-plan-day-empty span {
  max-width: 320px;
  font-size: 12px;
  line-height: 1.55;
}

#page-domain-plan .domain-plan-daily-tools {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 24px;
  margin-top: 20px;
  border-top: 1px solid var(--ds-border);
  padding-top: 20px;
}

#page-domain-plan .domain-plan-quick-task,
#page-domain-plan .domain-plan-daily-record {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 12px;
}

#page-domain-plan .domain-plan-daily-record {
  border-left: 1px solid var(--ds-border);
  padding-left: 24px;
}

#page-domain-plan .domain-plan-quick-task > div,
#page-domain-plan .domain-plan-daily-record-head > div:first-child {
  display: grid;
  gap: 4px;
}

#page-domain-plan .domain-plan-quick-task strong,
#page-domain-plan .domain-plan-daily-record-head strong {
  color: var(--ds-text-secondary);
  font-size: 14px;
}

#page-domain-plan .domain-plan-quick-task span,
#page-domain-plan .domain-plan-daily-record-head span {
  color: var(--ds-text-muted);
  font-size: 12px;
}

#page-domain-plan .annual-temporary-task-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(140px, .55fr) auto auto;
  align-items: end;
  gap: 10px;
  margin: 0;
  border: 0;
  padding: 0;
}

#page-domain-plan .annual-temporary-task-form > label {
  display: grid;
  align-items: stretch;
  gap: 6px;
  color: var(--ds-text-secondary);
  font-size: 12px;
}

#page-domain-plan .annual-temporary-task-form > label.inline-check {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

#page-domain-plan .annual-temporary-task-form > label.inline-check input {
  width: auto;
}

#page-domain-plan .domain-plan-daily-record-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

#page-domain-plan .domain-plan-daily-record-head > div:last-child {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
}

#page-domain-plan .domain-plan-daily-record-head button {
  min-height: 38px;
  white-space: nowrap;
}

#page-domain-plan .annual-daily-record-details {
  margin: 0;
  border-top: 1px solid var(--ds-border);
  padding-top: 12px;
}

#page-domain-plan .annual-daily-detail-form {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: 12px;
  margin-top: 12px;
}

#page-domain-plan .domain-daily-timeline-wrap {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-nested);
  background: var(--ds-surface-subtle);
  padding: 14px 16px 16px;
}

#page-domain-plan .domain-daily-timeline-wrap > strong {
  color: var(--ds-text-secondary);
  font-size: 13px;
}

#page-domain-plan .domain-daily-timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  min-height: 76px;
  align-items: center;
  overflow: hidden;
  padding: 18px 8px 6px;
}

#page-domain-plan .domain-daily-timeline::before {
  position: absolute;
  top: 36px;
  right: 18px;
  left: 18px;
  height: 4px;
  border-radius: var(--ds-radius-pill);
  background: linear-gradient(90deg, color-mix(in srgb, var(--ds-warning) 86%, white), color-mix(in srgb, var(--ds-warning) 70%, var(--ds-brand)));
  content: "";
}

#page-domain-plan .domain-daily-timeline::after {
  position: absolute;
  top: 29px;
  right: 8px;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 16px solid color-mix(in srgb, var(--ds-warning) 74%, var(--ds-brand));
  content: "";
}

#page-domain-plan .domain-daily-timeline-node {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 0;
  justify-items: center;
  gap: 8px;
  color: var(--ds-text-secondary);
  text-align: center;
}

#page-domain-plan .domain-daily-timeline-node::before {
  width: 12px;
  height: 12px;
  border: 3px solid var(--ds-surface-subtle);
  border-radius: 50%;
  background: var(--ds-warning);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ds-warning) 42%, var(--ds-border));
  content: "";
}

#page-domain-plan .domain-daily-timeline-node time {
  order: -1;
  color: var(--ds-text);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

#page-domain-plan .domain-daily-timeline-node span {
  color: var(--ds-text-muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

#page-domain-plan .domain-plan-recurring-manager {
  padding: 0;
}

#page-domain-plan .domain-plan-recurring-manager > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 16px 20px;
  list-style: none;
  cursor: pointer;
}

#page-domain-plan .domain-plan-recurring-manager > summary::-webkit-details-marker {
  display: none;
}

#page-domain-plan .domain-plan-recurring-manager > summary div {
  display: grid;
  gap: 4px;
}

#page-domain-plan .domain-plan-recurring-manager > summary strong {
  color: var(--ds-text);
  font-size: 15px;
}

#page-domain-plan .domain-plan-recurring-manager > summary span,
#page-domain-plan .domain-plan-recurring-manager > summary > b {
  color: var(--ds-text-muted);
  font-size: 12px;
}

#page-domain-plan .domain-plan-recurring-content {
  display: grid;
  gap: 18px;
  border-top: 1px solid var(--ds-border);
  padding: 20px;
}

#page-domain-plan .domain-plan-recurring-list {
  display: grid;
}

#page-domain-plan .domain-plan-recurring-list > article {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--ds-border);
  padding: 12px 0;
}

#page-domain-plan .domain-plan-recurring-list > article.paused {
  opacity: .58;
}

#page-domain-plan .domain-plan-recurring-list time,
#page-domain-plan .domain-plan-recurring-list > article > div:nth-child(2) {
  display: grid;
  gap: 3px;
}

#page-domain-plan .domain-plan-recurring-list time {
  color: var(--ds-text-secondary);
  font-size: 12px;
  font-weight: 700;
}

#page-domain-plan .domain-plan-recurring-list time small,
#page-domain-plan .domain-plan-recurring-list > article > div:nth-child(2) span,
#page-domain-plan .domain-plan-recurring-list > article > b {
  color: var(--ds-text-muted);
  font-size: 11px;
}

#page-domain-plan .domain-plan-recurring-list > article > div:nth-child(2) strong {
  color: var(--ds-text-secondary);
  font-size: 13px;
}

#page-domain-plan .domain-plan-recurring-list > article > div:last-child {
  display: flex;
  gap: 6px;
}

#page-domain-plan .domain-plan-recurring-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 130px 140px 180px auto;
  align-items: end;
  gap: 10px;
}

#page-domain-plan .domain-plan-recurring-form label {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: var(--ds-text-secondary);
  font-size: 12px;
}

#page-domain-plan .domain-plan-recurring-form input,
#page-domain-plan .domain-plan-recurring-form select {
  width: 100%;
}

#page-domain-plan .annual-planning-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

#page-domain-plan .annual-planning-summary-grid article {
  display: grid;
  min-width: 0;
  min-height: 104px;
  align-content: center;
  gap: 5px;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-card);
  background: var(--ds-surface);
  padding: 16px 18px;
}

#page-domain-plan .annual-planning-summary-grid span,
#page-domain-plan .annual-planning-summary-grid small {
  color: var(--ds-text-muted);
  font-size: 12px;
}

#page-domain-plan .annual-planning-summary-grid strong {
  overflow: hidden;
  color: var(--ds-text);
  font-size: 22px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-domain-plan .finance-savings-overview {
  display: grid;
  gap: 22px;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-card);
  background: var(--ds-surface);
  padding: 22px 26px 24px;
}

#page-domain-plan .finance-savings-overview > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--ds-border);
  padding-bottom: 16px;
}

#page-domain-plan .finance-savings-overview > header div {
  display: grid;
  gap: 4px;
}

#page-domain-plan .finance-savings-overview > header span {
  color: var(--ds-brand-strong);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
}

#page-domain-plan .finance-savings-overview > header h2 {
  margin: 0;
  color: var(--ds-text);
  font-size: 18px;
  line-height: 1.4;
}

#page-domain-plan .finance-savings-overview > header small {
  max-width: 320px;
  color: var(--ds-text-muted);
  font-size: 12px;
  line-height: 1.6;
  text-align: right;
}

#page-domain-plan .finance-savings-rings {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

#page-domain-plan .finance-savings-goal {
  display: grid;
  min-width: 0;
  justify-items: center;
  gap: 12px;
  padding: 2px 8px 0;
  text-align: center;
}

#page-domain-plan .finance-savings-goal.is-summary .finance-savings-ring {
  background: conic-gradient(var(--ds-brand-strong) var(--saving-progress), var(--ds-border) 0);
}

#page-domain-plan .finance-savings-goal.is-summary .finance-savings-goal-copy > strong {
  color: var(--ds-brand-strong);
}

#page-domain-plan .finance-savings-ring {
  display: grid;
  width: clamp(112px, 9vw, 138px);
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--ds-brand) var(--saving-progress), var(--ds-border) 0);
}

#page-domain-plan .finance-savings-ring::before {
  content: "";
  grid-area: 1 / 1;
  width: calc(100% - 14px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--ds-surface);
}

#page-domain-plan .finance-savings-ring > div {
  z-index: 1;
  display: grid;
  grid-area: 1 / 1;
  justify-items: center;
  gap: 2px;
}

#page-domain-plan .finance-savings-ring strong {
  color: var(--ds-text);
  font-size: 25px;
  line-height: 1;
}

#page-domain-plan .finance-savings-ring strong small {
  margin-left: 1px;
  color: var(--ds-text-muted);
  font-size: 12px;
  font-weight: 700;
}

#page-domain-plan .finance-savings-ring span {
  color: var(--ds-text-muted);
  font-size: 11px;
}

#page-domain-plan .finance-savings-goal-copy {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 4px;
}

#page-domain-plan .finance-savings-goal-copy > strong {
  overflow: hidden;
  color: var(--ds-text);
  font-size: 14px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-domain-plan .finance-savings-goal-copy > small {
  overflow-wrap: anywhere;
  color: var(--ds-text-muted);
  font-size: 11px;
  line-height: 1.5;
}

#page-domain-plan .finance-savings-goal.is-empty .finance-savings-ring {
  background: var(--ds-border);
}

#page-domain-plan .finance-savings-goal.is-empty .finance-savings-ring::before {
  background: var(--ds-surface-subtle);
}

#page-domain-plan .finance-savings-goal.is-empty .finance-savings-goal-copy > strong {
  color: var(--ds-text-secondary);
}

#page-domain-plan .finance-overview-goal-editor {
  display: grid;
  gap: 14px;
  border-top: 1px solid var(--ds-border);
  padding-top: 16px;
}

#page-domain-plan .finance-overview-goal-editor > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#page-domain-plan .finance-overview-goal-editor > header div {
  display: grid;
  gap: 3px;
}

#page-domain-plan .finance-overview-goal-editor > header strong {
  color: var(--ds-text);
  font-size: 14px;
}

#page-domain-plan .finance-overview-goal-editor > header span {
  color: var(--ds-text-muted);
  font-size: 12px;
  line-height: 1.5;
}

#page-domain-plan .finance-overview-goal-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

#page-domain-plan .finance-overview-goal-fields article {
  display: grid;
  min-width: 0;
  gap: 10px;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-lg);
  background: var(--ds-surface-subtle);
  padding: 12px;
}

#page-domain-plan .finance-overview-goal-fields article > span {
  color: var(--ds-brand-strong);
  font-size: 12px;
  font-weight: 700;
}

#page-domain-plan .finance-overview-goal-fields label {
  display: grid;
  gap: 5px;
  color: var(--ds-text-secondary);
  font-size: 12px;
  font-weight: 700;
}

#page-domain-plan .finance-overview-goal-fields input {
  min-width: 0;
}

#page-domain-plan .annual-finance-weekly-budget {
  display: grid;
  gap: 16px;
  border-color: var(--ds-border);
  border-radius: var(--ds-radius-card);
  background: var(--ds-surface);
  box-shadow: none;
}

#page-domain-plan .annual-finance-weekly-budget > .panel-head {
  align-items: end;
  border-bottom: 1px solid var(--ds-border);
  padding-bottom: 14px;
}

#page-domain-plan .annual-finance-weekly-budget > .panel-head > div {
  display: grid;
  gap: 4px;
}

#page-domain-plan .annual-finance-weekly-budget > .panel-head > strong {
  color: var(--ds-brand-strong);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

#page-domain-plan .annual-finance-weekly-budget .annual-budget-compact {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-nested);
  background: var(--ds-border);
}

#page-domain-plan .annual-finance-weekly-budget .annual-budget-compact > div {
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: var(--ds-surface-subtle);
  padding: 13px 14px;
}

#page-domain-plan .annual-finance-weekly-budget .annual-budget-compact span {
  color: var(--ds-text-muted);
  font-size: 11px;
}

#page-domain-plan .annual-finance-weekly-budget .annual-budget-compact strong {
  color: var(--ds-text);
  font-size: 16px;
}

#page-domain-plan .annual-finance-ai-review {
  overflow: hidden;
  border-color: var(--ds-border);
  border-radius: var(--ds-radius-card);
  background: var(--ds-surface);
  padding: 0;
  box-shadow: none;
}

#page-domain-plan .annual-finance-ai-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--ds-border);
  padding: 22px 24px 18px;
}

#page-domain-plan .annual-finance-ai-head h2 {
  margin: 4px 0 5px;
  color: var(--ds-text);
  font-size: 20px;
}

#page-domain-plan .annual-finance-ai-head p {
  margin: 0;
  color: var(--ds-text-muted);
  font-size: 13px;
  line-height: 1.6;
}

#page-domain-plan .annual-finance-ai-head > label {
  display: grid;
  min-width: 142px;
  gap: 5px;
  color: var(--ds-text-muted);
  font-size: 11px;
  font-weight: 700;
}

#page-domain-plan .annual-finance-ai-head select {
  min-height: 40px;
}

#page-domain-plan .annual-finance-review-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--ds-border);
  background: var(--ds-surface-subtle);
}

#page-domain-plan .annual-finance-review-metrics article {
  display: grid;
  min-width: 0;
  gap: 4px;
  border-right: 1px solid var(--ds-border);
  padding: 15px 18px;
}

#page-domain-plan .annual-finance-review-metrics article:last-child {
  border-right: 0;
}

#page-domain-plan .annual-finance-review-metrics span,
#page-domain-plan .annual-finance-review-metrics small {
  overflow: hidden;
  color: var(--ds-text-muted);
  font-size: 11px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-domain-plan .annual-finance-review-metrics strong {
  color: var(--ds-text);
  font-size: 18px;
}

#page-domain-plan .annual-finance-review-metrics .increase strong,
#page-domain-plan .annual-finance-change-feed b.increase {
  color: var(--ds-success);
}

#page-domain-plan .annual-finance-review-metrics .decrease strong,
#page-domain-plan .annual-finance-change-feed b.decrease {
  color: var(--ds-danger);
}

#page-domain-plan .annual-finance-review-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
}

#page-domain-plan .annual-finance-review-insight,
#page-domain-plan .annual-finance-change-feed {
  min-width: 0;
  padding: 22px 24px;
}

#page-domain-plan .annual-finance-change-feed {
  border-left: 1px solid var(--ds-border);
}

#page-domain-plan .annual-finance-review-insight > header,
#page-domain-plan .annual-finance-change-feed > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

#page-domain-plan .annual-finance-review-insight > header > div,
#page-domain-plan .annual-finance-change-feed > header > div {
  display: grid;
  gap: 3px;
}

#page-domain-plan .annual-finance-review-insight > header span,
#page-domain-plan .annual-finance-change-feed > header span {
  color: var(--ds-text-muted);
  font-size: 11px;
}

#page-domain-plan .annual-finance-review-insight > header strong,
#page-domain-plan .annual-finance-change-feed > header strong {
  color: var(--ds-text);
  font-size: 15px;
}

#page-domain-plan .annual-finance-review-insight > header > b,
#page-domain-plan .annual-finance-change-feed > header > b {
  border-radius: 999px;
  background: var(--ds-surface-subtle);
  color: var(--ds-text-muted);
  padding: 5px 9px;
  font-size: 10px;
  white-space: nowrap;
}

#page-domain-plan .annual-finance-review-insight > header > b.ai {
  background: var(--ds-brand-soft);
  color: var(--ds-brand-strong);
}

#page-domain-plan .annual-finance-review-insight > header > b.stale {
  background: var(--ds-warning-soft);
  color: var(--ds-warning);
}

#page-domain-plan .annual-finance-review-summary {
  display: grid;
}

#page-domain-plan .annual-finance-review-summary > section {
  display: grid;
  gap: 6px;
  border-bottom: 1px solid var(--ds-border);
  padding: 12px 0;
}

#page-domain-plan .annual-finance-review-summary > section:first-child {
  padding-top: 0;
}

#page-domain-plan .annual-finance-review-summary > section.next {
  border-bottom: 0;
  padding-bottom: 4px;
}

#page-domain-plan .annual-finance-review-summary strong {
  color: var(--ds-text-secondary);
  font-size: 12px;
}

#page-domain-plan .annual-finance-review-summary p {
  margin: 0;
  color: var(--ds-text);
  font-size: 13px;
  line-height: 1.65;
}

#page-domain-plan .annual-finance-review-summary .next p {
  color: var(--ds-brand-strong);
  font-weight: 650;
}

#page-domain-plan .annual-finance-review-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

#page-domain-plan .annual-finance-review-actions button {
  flex: 0 0 auto;
}

#page-domain-plan .annual-finance-review-actions span {
  color: var(--ds-text-muted);
  font-size: 10px;
  line-height: 1.5;
}

#page-domain-plan .annual-finance-change-feed > div {
  display: grid;
  max-height: 390px;
  overflow-y: auto;
  scrollbar-width: thin;
}

#page-domain-plan .annual-finance-change-feed article {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--ds-border);
  padding: 11px 0;
}

#page-domain-plan .annual-finance-change-feed article > i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ds-border-strong);
}

#page-domain-plan .annual-finance-change-feed article > i.increase { background: var(--ds-success); }
#page-domain-plan .annual-finance-change-feed article > i.decrease { background: var(--ds-danger); }

#page-domain-plan .annual-finance-change-feed article > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

#page-domain-plan .annual-finance-change-feed article > div strong {
  overflow: hidden;
  color: var(--ds-text-secondary);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-domain-plan .annual-finance-change-feed article > div span,
#page-domain-plan .annual-finance-change-feed article time {
  color: var(--ds-text-muted);
  font-size: 10px;
  line-height: 1.45;
}

#page-domain-plan .annual-finance-change-feed article > b {
  font-size: 12px;
  text-align: right;
}

#page-domain-plan .annual-finance-change-feed article time {
  grid-column: 2 / -1;
}

#page-domain-plan .annual-finance-ai-review > footer {
  border-top: 1px solid var(--ds-border);
  color: var(--ds-text-muted);
  padding: 12px 24px;
  font-size: 10px;
  line-height: 1.6;
}

@media (max-width: 900px) {
  #page-domain-plan .annual-finance-review-layout {
    grid-template-columns: 1fr;
  }

  #page-domain-plan .annual-finance-change-feed {
    border-top: 1px solid var(--ds-border);
    border-left: 0;
  }
}

@media (max-width: 600px) {
  #page-domain-plan .annual-finance-ai-head {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
    padding: 18px 16px 16px;
  }

  #page-domain-plan .annual-finance-ai-head > label {
    min-width: 0;
  }

  #page-domain-plan .annual-finance-review-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #page-domain-plan .annual-finance-review-metrics article:nth-child(2) {
    border-right: 0;
  }

  #page-domain-plan .annual-finance-review-metrics article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--ds-border);
  }

  #page-domain-plan .annual-finance-review-insight,
  #page-domain-plan .annual-finance-change-feed {
    padding: 18px 16px;
  }

  #page-domain-plan .annual-finance-review-actions {
    align-items: stretch;
    flex-direction: column;
  }

  #page-domain-plan .annual-finance-review-actions button {
    width: 100%;
  }

  #page-domain-plan .annual-finance-ai-review > footer {
    padding-right: 16px;
    padding-left: 16px;
  }
}

#page-domain-plan .domain-body-measurement-panel {
  overflow: hidden;
  border-color: var(--ds-border);
  border-radius: var(--ds-radius-card);
  background: var(--ds-surface);
  padding: 0;
  box-shadow: none;
}

#page-domain-plan .domain-body-measurement-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--ds-border);
  padding: 20px 22px 18px;
}

#page-domain-plan .domain-body-measurement-head h2 {
  margin: 4px 0 5px;
  color: var(--ds-text);
  font-size: 22px;
  line-height: 1.25;
}

#page-domain-plan .domain-body-measurement-head p {
  margin: 0;
  color: var(--ds-text-muted);
  font-size: 13px;
  line-height: 1.6;
}

#page-domain-plan .domain-body-measurement-meta {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto;
  align-items: end;
  gap: 10px;
  min-width: min(100%, 290px);
}

#page-domain-plan .domain-body-measurement-meta > label {
  display: grid;
  gap: 5px;
  color: var(--ds-text-muted);
  font-size: 11px;
  font-weight: 700;
}

#page-domain-plan .domain-body-measurement-meta input {
  width: 100%;
  min-height: 40px;
}

#page-domain-plan .domain-body-measurement-meta > div {
  display: grid;
  min-height: 40px;
  align-content: center;
  border-left: 1px solid var(--ds-border);
  padding-left: 12px;
  white-space: nowrap;
}

#page-domain-plan .domain-body-measurement-meta > div strong {
  color: var(--ds-brand-strong);
  font-size: 16px;
  line-height: 1.1;
}

#page-domain-plan .domain-body-measurement-meta > div span {
  color: var(--ds-text-muted);
  font-size: 10px;
}

#page-domain-plan .domain-body-measurement-core {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--ds-border);
}

#page-domain-plan .domain-body-measurement-core > * {
  border-right: 1px solid var(--ds-border);
}

#page-domain-plan .domain-body-measurement-core > *:last-child {
  border-right: 0;
}

#page-domain-plan .domain-body-measurement-field,
#page-domain-plan .domain-body-bmi {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 8px;
  padding: 17px 20px;
  transition: background-color 160ms ease;
}

#page-domain-plan .domain-body-measurement-field:focus-within {
  background: var(--ds-brand-soft);
}

#page-domain-plan .domain-body-measurement-field > span,
#page-domain-plan .domain-body-bmi > span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

#page-domain-plan .domain-body-measurement-field > span strong,
#page-domain-plan .domain-body-bmi > span strong {
  color: var(--ds-text-secondary);
  font-size: 13px;
}

#page-domain-plan .domain-body-measurement-field > span small,
#page-domain-plan .domain-body-bmi > span small {
  color: var(--ds-text-faint);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

#page-domain-plan .domain-body-measurement-control {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 7px;
}

#page-domain-plan .domain-body-measurement-control input {
  width: 100%;
  min-width: 0;
  height: 34px;
  min-height: 34px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  color: var(--ds-text);
  box-shadow: none;
  font-size: 22px;
  font-weight: 760;
  line-height: 1.2;
}

#page-domain-plan .domain-body-measurement-control input:focus {
  outline: 2px solid var(--ds-brand);
  outline-offset: 3px;
  box-shadow: var(--ds-focus-ring);
}

#page-domain-plan .domain-body-measurement-control input::placeholder {
  color: var(--ds-text-faint);
  font-weight: 650;
  opacity: .65;
}

#page-domain-plan .domain-body-measurement-control em {
  color: var(--ds-text-muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

#page-domain-plan .domain-body-measurement-history,
#page-domain-plan .domain-body-bmi > small {
  overflow: hidden;
  color: var(--ds-text-muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-domain-plan .domain-body-bmi output {
  color: var(--ds-brand-strong);
  font-size: 26px;
  font-weight: 780;
  line-height: 34px;
}

#page-domain-plan .domain-body-measurement-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--ds-border);
  padding: 14px 20px 11px;
}

#page-domain-plan .domain-body-measurement-section-head strong {
  color: var(--ds-text);
  font-size: 14px;
}

#page-domain-plan .domain-body-measurement-section-head span {
  color: var(--ds-text-muted);
  font-size: 11px;
}

#page-domain-plan .domain-body-measurement-dimensions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#page-domain-plan .domain-body-measurement-dimensions > * {
  border-right: 1px solid var(--ds-border);
  border-bottom: 1px solid var(--ds-border);
}

#page-domain-plan .domain-body-measurement-dimensions > *:nth-child(3n) {
  border-right: 0;
}

#page-domain-plan .domain-body-measurement-dimensions > *:nth-last-child(-n + 3) {
  border-bottom: 0;
}

#page-domain-plan .domain-body-measurement-panel > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--ds-border);
  padding: 12px 20px;
  color: var(--ds-text-muted);
  font-size: 11px;
  line-height: 1.5;
}

#page-domain-plan .domain-body-measurement-panel > footer small {
  color: var(--ds-text-faint);
  text-align: right;
}

@media (max-width: 900px) {
  #page-domain-plan .domain-body-measurement-head {
    align-items: stretch;
  }

  #page-domain-plan .domain-body-measurement-core,
  #page-domain-plan .domain-body-measurement-dimensions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #page-domain-plan .domain-body-measurement-core > *,
  #page-domain-plan .domain-body-measurement-dimensions > * {
    border-right: 1px solid var(--ds-border);
    border-bottom: 1px solid var(--ds-border);
  }

  #page-domain-plan .domain-body-measurement-dimensions > *:nth-child(3n) {
    border-right: 1px solid var(--ds-border);
  }

  #page-domain-plan .domain-body-measurement-dimensions > *:nth-last-child(-n + 3) {
    border-bottom: 1px solid var(--ds-border);
  }

  #page-domain-plan .domain-body-measurement-core > *:nth-child(2n),
  #page-domain-plan .domain-body-measurement-dimensions > *:nth-child(2n) {
    border-right: 0;
  }

  #page-domain-plan .domain-body-measurement-core > *:nth-last-child(-n + 2),
  #page-domain-plan .domain-body-measurement-dimensions > *:nth-last-child(-n + 2) {
    border-bottom: 0;
  }
}

@media (max-width: 620px) {
  #page-domain-plan .domain-body-measurement-head {
    display: grid;
    gap: 16px;
    padding: 18px 16px 16px;
  }

  #page-domain-plan .domain-body-measurement-meta {
    width: 100%;
    min-width: 0;
  }

  #page-domain-plan .domain-body-measurement-section-head,
  #page-domain-plan .domain-body-measurement-panel > footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  #page-domain-plan .domain-body-measurement-panel > footer small {
    text-align: left;
  }
}

@media (max-width: 520px) {
  #page-domain-plan .domain-body-measurement-core {
    grid-template-columns: 1fr;
  }

  #page-domain-plan .domain-body-measurement-core > *,
  #page-domain-plan .domain-body-measurement-core > *:nth-child(2n),
  #page-domain-plan .domain-body-measurement-core > *:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--ds-border);
  }

  #page-domain-plan .domain-body-measurement-core > *:last-child {
    border-bottom: 0;
  }

  #page-domain-plan .domain-body-measurement-field,
  #page-domain-plan .domain-body-bmi {
    padding: 15px 16px;
  }
}

@media (max-width: 360px) {
  #page-domain-plan .domain-body-measurement-dimensions {
    grid-template-columns: 1fr;
  }

  #page-domain-plan .domain-body-measurement-dimensions > *,
  #page-domain-plan .domain-body-measurement-dimensions > *:nth-child(2n),
  #page-domain-plan .domain-body-measurement-dimensions > *:nth-last-child(-n + 3),
  #page-domain-plan .domain-body-measurement-dimensions > *:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--ds-border);
  }

  #page-domain-plan .domain-body-measurement-dimensions > *:last-child {
    border-bottom: 0;
  }
}

#page-domain-plan .domain-care-products-panel {
  overflow: hidden;
  border-color: var(--ds-border);
  border-radius: var(--ds-radius-card);
  background: var(--ds-surface);
  padding: 0;
  box-shadow: none;
}

#page-domain-plan .domain-care-products-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 22px 18px;
}

#page-domain-plan .domain-care-products-head h2 {
  margin: 4px 0 5px;
  color: var(--ds-text);
  font-size: 22px;
  line-height: 1.25;
}

#page-domain-plan .domain-care-products-head p {
  margin: 0;
  color: var(--ds-text-muted);
  font-size: 13px;
  line-height: 1.6;
}

#page-domain-plan .domain-care-products-head > div:last-child {
  display: grid;
  min-width: 72px;
  justify-items: end;
  border-left: 1px solid var(--ds-border);
  padding-left: 18px;
}

#page-domain-plan .domain-care-products-head > div:last-child strong {
  color: var(--ds-brand-strong);
  font-size: 18px;
  line-height: 1.2;
}

#page-domain-plan .domain-care-products-head > div:last-child span {
  color: var(--ds-text-muted);
  font-size: 10px;
}

#page-domain-plan .domain-care-products-table {
  border-top: 1px solid var(--ds-border);
}

#page-domain-plan .domain-care-products-columns,
#page-domain-plan .domain-care-product-row {
  display: grid;
  grid-template-columns: 132px minmax(180px, 1.15fr) minmax(180px, 1fr) 132px;
  min-width: 0;
  align-items: center;
  gap: 14px;
  padding-right: 20px;
  padding-left: 20px;
}

#page-domain-plan .domain-care-products-columns {
  min-height: 38px;
  color: var(--ds-text-faint);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .04em;
}

#page-domain-plan .domain-care-product-row {
  min-height: 72px;
  border-top: 1px solid var(--ds-border);
  transition: background-color 160ms ease;
}

#page-domain-plan .domain-care-product-row:focus-within {
  background: var(--ds-brand-soft);
}

#page-domain-plan .domain-care-product-category {
  display: grid;
  min-width: 0;
  gap: 3px;
}

#page-domain-plan .domain-care-product-category strong {
  color: var(--ds-text);
  font-size: 14px;
}

#page-domain-plan .domain-care-product-category small {
  overflow: hidden;
  color: var(--ds-text-muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-domain-plan .domain-care-product-row > label {
  display: grid;
  min-width: 0;
  gap: 5px;
}

#page-domain-plan .domain-care-product-row > label > span {
  display: none;
  color: var(--ds-text-muted);
  font-size: 10px;
  font-weight: 700;
}

#page-domain-plan .domain-care-product-row input,
#page-domain-plan .domain-care-product-row select {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  border-color: var(--ds-border);
  background: var(--ds-surface);
  box-shadow: none;
}

#page-domain-plan .domain-care-product-row input:focus,
#page-domain-plan .domain-care-product-row select:focus {
  border-color: var(--ds-brand);
}

#page-domain-plan .domain-care-products-panel > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--ds-border);
  padding: 12px 20px;
  color: var(--ds-text-muted);
  font-size: 11px;
  line-height: 1.5;
}

#page-domain-plan .domain-care-products-panel > footer small {
  color: var(--ds-text-faint);
  text-align: right;
}

@media (max-width: 980px) {
  #page-domain-plan .domain-care-products-columns,
  #page-domain-plan .domain-care-product-row {
    grid-template-columns: 112px minmax(150px, 1fr) minmax(150px, 1fr) 124px;
    gap: 10px;
    padding-right: 16px;
    padding-left: 16px;
  }
}

@media (max-width: 720px) {
  #page-domain-plan .domain-care-products-head {
    gap: 16px;
    padding: 18px 16px 16px;
  }

  #page-domain-plan .domain-care-products-columns {
    display: none;
  }

  #page-domain-plan .domain-care-product-row {
    grid-template-areas:
      "category status"
      "name name"
      "usage usage";
    grid-template-columns: minmax(0, 1fr) 132px;
    gap: 10px 12px;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  #page-domain-plan .domain-care-product-category { grid-area: category; }
  #page-domain-plan .domain-care-product-name { grid-area: name; }
  #page-domain-plan .domain-care-product-usage { grid-area: usage; }
  #page-domain-plan .domain-care-product-status { grid-area: status; }

  #page-domain-plan .domain-care-product-row > label > span {
    display: block;
  }

  #page-domain-plan .domain-care-products-panel > footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  #page-domain-plan .domain-care-products-panel > footer small {
    text-align: left;
  }
}

@media (max-width: 430px) {
  #page-domain-plan .domain-care-products-head {
    display: grid;
  }

  #page-domain-plan .domain-care-products-head > div:last-child {
    min-width: 0;
    justify-items: start;
    border-top: 1px solid var(--ds-border);
    border-left: 0;
    padding-top: 10px;
    padding-left: 0;
  }

  #page-domain-plan .domain-care-product-row {
    grid-template-columns: minmax(0, 1fr) 122px;
  }
}

#page-domain-plan .domain-plan-workspace-panel {
  padding: 22px 24px;
}

#page-domain-plan .annual-training-variant-panel {
  grid-template-columns: minmax(170px, 220px) minmax(220px, 1fr) auto;
  align-items: end;
  border-color: var(--ds-border);
  border-radius: var(--ds-radius-nested);
  background: var(--ds-surface-subtle);
  padding: 10px 12px;
}

#page-domain-plan .annual-training-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

#page-domain-plan .annual-training-actions button {
  flex: 0 0 auto;
  width: auto;
  min-height: 36px;
  padding: 0 12px;
  white-space: nowrap;
}

#page-domain-plan .annual-training-actions .danger {
  border-color: color-mix(in srgb, var(--ds-danger) 36%, var(--ds-border));
  background: transparent;
  color: var(--ds-danger);
  box-shadow: none;
}

#page-domain-plan .annual-workspace-detail {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

#page-domain-plan .annual-workspace-tabs {
  overflow-x: auto;
  gap: 0;
  border-bottom: 1px solid var(--ds-border);
  border-radius: 0;
  background: transparent;
  padding: 0;
  scrollbar-width: thin;
}

#page-domain-plan .annual-workspace-tabs button {
  flex: 0 0 auto;
  min-height: 44px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--ds-text-muted);
  padding: 0 18px;
  box-shadow: none;
}

#page-domain-plan .annual-workspace-tabs button.active {
  border-bottom-color: var(--ds-brand);
  color: var(--ds-brand-strong);
}

#page-domain-plan .annual-training-test-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--ds-brand-border);
  border-radius: var(--ds-radius-nested);
  background: var(--ds-brand-soft);
  padding: 11px 14px;
}

#page-domain-plan .annual-training-test-note strong {
  color: var(--ds-brand-strong);
  font-size: 13px;
}

#page-domain-plan .annual-training-test-note span {
  color: var(--ds-text-muted);
  font-size: 12px;
}

@media (max-width: 1024px) {
  #page-domain-plan .domain-plan-calendar-layout {
    grid-template-columns: 1fr;
  }

  #page-domain-plan .domain-plan-day-panel {
    border-top: 1px solid var(--ds-border);
    border-left: 0;
  }

  #page-domain-plan .domain-plan-day-groups {
    min-height: 180px;
  }

  #page-domain-plan .domain-plan-daily-tools {
    grid-template-columns: 1fr;
  }

  #page-domain-plan .domain-plan-daily-record {
    border-top: 1px solid var(--ds-border);
    border-left: 0;
    padding-top: 20px;
    padding-left: 0;
  }

  #page-domain-plan .domain-plan-recurring-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #page-domain-plan .domain-plan-recurring-form button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  #page-domain-plan {
    padding-right: 16px;
    padding-left: 16px;
  }

  #page-domain-plan .domain-plan-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #page-domain-plan .domain-plan-days > i,
  #page-domain-plan .domain-plan-days > button {
    min-height: 78px;
  }
}

@media (max-width: 680px) {
  #page-domain-plan {
    padding: 0 12px 28px;
  }

  #page-domain-plan .domain-plan-page-heading {
    padding-top: 18px;
  }

  #page-domain-plan .domain-plan-tabs {
    gap: 5px;
    margin-bottom: 16px;
    padding: 5px;
  }

  #page-domain-plan .domain-plan-tabs button {
    min-height: 50px;
    padding: 8px 10px;
  }

  #page-domain-plan .domain-plan-tabs small {
    display: none;
  }

  #page-domain-plan .domain-plan-calendar-panel,
  #page-domain-plan .domain-plan-workspace-panel {
    padding: 16px;
  }

  #page-domain-plan .domain-plan-calendar-head {
    align-items: stretch;
    flex-direction: column;
  }

  #page-domain-plan .annual-temporary-task-form {
    grid-template-columns: 1fr;
  }

  #page-domain-plan .annual-temporary-task-form > label.inline-check {
    min-height: 32px;
  }

  #page-domain-plan .domain-plan-daily-record-head {
    align-items: stretch;
    flex-direction: column;
  }

  #page-domain-plan .domain-plan-daily-record-head > div:last-child {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  #page-domain-plan .annual-daily-detail-form {
    grid-template-columns: 1fr;
  }

  #page-domain-plan .domain-daily-timeline {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 16px;
    min-height: auto;
    padding: 6px 0 2px;
  }

  #page-domain-plan .domain-daily-timeline::before,
  #page-domain-plan .domain-daily-timeline::after {
    display: none;
  }

  #page-domain-plan .domain-daily-timeline-node {
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-nested);
    background: var(--ds-surface);
    padding: 10px 8px;
  }

  #page-domain-plan .annual-training-variant-panel {
    grid-template-columns: 1fr;
  }

  #page-domain-plan .annual-training-actions {
    justify-content: flex-start;
  }

  #page-domain-plan .annual-training-test-note {
    align-items: flex-start;
    flex-direction: column;
  }

  #page-domain-plan .domain-plan-month-nav {
    justify-content: space-between;
  }

  #page-domain-plan .domain-plan-month-nav strong {
    flex: 1;
  }

  #page-domain-plan .domain-plan-days > i,
  #page-domain-plan .domain-plan-days > button {
    min-height: 64px;
    padding: 7px;
  }

  #page-domain-plan .domain-plan-days > button.today > span {
    width: 24px;
    height: 24px;
  }

  #page-domain-plan .domain-plan-legend {
    gap: 8px 12px;
  }

  #page-domain-plan .domain-plan-recurring-manager > summary,
  #page-domain-plan .domain-plan-recurring-content {
    padding-right: 16px;
    padding-left: 16px;
  }

  #page-domain-plan .domain-plan-recurring-list > article {
    grid-template-columns: 74px minmax(0, 1fr) auto;
    gap: 9px;
  }

  #page-domain-plan .domain-plan-recurring-list > article > div:last-child {
    grid-column: 2 / -1;
    justify-content: flex-end;
  }

  #page-domain-plan .domain-plan-recurring-form,
  #page-domain-plan .annual-planning-summary-grid {
    grid-template-columns: 1fr;
  }

  #page-domain-plan .finance-savings-overview {
    gap: 18px;
    padding: 18px;
  }

  #page-domain-plan .finance-savings-overview > header {
    align-items: start;
    flex-direction: column;
    gap: 6px;
  }

  #page-domain-plan .finance-savings-overview > header small {
    max-width: none;
    text-align: left;
  }

  #page-domain-plan .finance-savings-rings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 12px;
  }

  #page-domain-plan .finance-overview-goal-editor > header {
    align-items: flex-start;
    flex-direction: column;
  }

  #page-domain-plan .finance-overview-goal-fields {
    grid-template-columns: 1fr;
  }

  #page-domain-plan .annual-finance-weekly-budget > .panel-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  #page-domain-plan .annual-finance-weekly-budget > .panel-head > strong {
    white-space: normal;
  }

  #page-domain-plan .annual-finance-weekly-budget .annual-budget-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #page-domain-plan .annual-planning-summary-grid article {
    min-height: 90px;
  }
}

@media (max-width: 430px) {
  #page-domain-plan .domain-plan-days > i,
  #page-domain-plan .domain-plan-days > button {
    min-height: 58px;
    padding: 6px;
  }

  #page-domain-plan .domain-plan-days > button > b i {
    width: 10px;
  }

  #page-domain-plan .domain-plan-day-panel > header,
  #page-domain-plan .domain-plan-day-panel > footer,
  #page-domain-plan .domain-plan-day-groups {
    padding-right: 14px;
    padding-left: 14px;
  }
}

@media (max-width: 360px) {
  #page-domain-plan .finance-savings-ring {
    width: 104px;
  }

  #page-domain-plan .finance-savings-goal {
    padding-inline: 2px;
  }

  #page-domain-plan .annual-finance-weekly-budget .annual-budget-compact {
    grid-template-columns: 1fr;
  }
}

#page-annual .annual-tabs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 680px) {
  #page-annual .annual-tabs {
    grid-template-columns: 1fr;
  }
}

#page-annual .annual-planning-workspace-panel {
  border-color: var(--ds-border);
  padding: 24px;
  box-shadow: none;
}

#page-annual .annual-planning-workspace-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

#page-annual .annual-planning-workspace-actions button {
  min-height: 34px;
}

#page-annual .annual-planning-workspace-stage {
  min-width: 0;
  margin-top: 18px;
}

#page-annual .annual-planning-workspace-stage .annual-workspace-detail {
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

#page-annual .annual-planning-workspace-stage .annual-workspace-tabs {
  overflow-x: auto;
  scrollbar-width: thin;
}

#page-annual .annual-planning-workspace-stage .annual-workspace-tabs button {
  flex: 0 0 auto;
  min-height: 44px;
  padding-right: 18px;
  padding-left: 18px;
}

@media (max-width: 680px) {
  #page-annual .annual-planning-workspace-panel {
    padding: 18px;
  }

  #page-annual .annual-planning-workspace-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 430px) {
  #page-inventory .inventory-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #page-inventory .inventory-toolbar {
    grid-template-columns: 1fr;
  }

  #page-inventory .inventory-toolbar .search-input {
    grid-column: auto;
  }

  #page-inventory .inventory-category-list {
    grid-template-columns: 1fr;
  }

  .inventory-form-section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }
}

/* Resource library refinement: a quiet file catalogue, not a card wall. */
#page-resources .resource-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--ds-border);
  border-bottom: 1px solid var(--ds-border);
}

#page-resources .resource-stats .metric {
  min-height: 94px;
  padding: 16px 18px;
  border: 0;
  border-right: 1px solid var(--ds-border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#page-resources .resource-stats .metric:first-child {
  border-left: 3px solid var(--ds-brand);
  background: var(--ds-brand-soft);
}

#page-resources .resource-stats .metric:last-child {
  border-right: 0;
}

#page-resources .resource-stats .metric strong {
  margin: 4px 0 2px;
  font-size: 25px;
}

#page-resources .resource-recent-section {
  margin-top: 18px;
}

#page-resources .resource-quick-access {
  gap: 0;
  border-top: 1px solid var(--ds-border);
  border-bottom: 1px solid var(--ds-border);
}

#page-resources .resource-quick-card {
  min-height: 74px;
  padding: 11px 14px;
  border: 0;
  border-right: 1px solid var(--ds-border);
  border-radius: 0;
  box-shadow: none;
}

#page-resources .resource-quick-card:last-child {
  border-right: 0;
}

#page-resources .resource-quick-card:hover {
  background: var(--ds-brand-soft);
  box-shadow: none;
  transform: none;
}

#page-resources .resource-file-icon,
#page-resources .resource-card-file-icon {
  width: 42px;
  height: 44px;
  border: 1px solid #e0e4ef;
  border-radius: 8px;
  background: var(--ds-surface-subtle);
  color: var(--ds-brand-strong);
}

#page-resources .resource-library-layout {
  grid-template-columns: 216px minmax(0, 1fr);
  gap: 16px;
  margin-top: 18px;
}

#page-resources .resource-folder-panel,
#page-resources .resource-library-panel {
  border-radius: var(--ds-radius-card);
}

#page-resources .resource-folder-panel {
  padding: 16px;
}

#page-resources .resource-folder-list {
  display: grid;
  gap: 3px;
  margin-top: 8px;
}

#page-resources .resource-folder-item {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ds-text-secondary);
}

#page-resources .resource-folder-item:hover,
#page-resources .resource-folder-item.active,
#page-resources .resource-folder-row.active .resource-folder-item {
  background: var(--ds-brand-soft);
  color: var(--ds-brand-strong);
}

#page-resources .resource-library-panel {
  min-width: 0;
  padding: 18px;
}

#page-resources .resource-view-label {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ds-text-muted);
  padding: 0;
}

#page-resources .resource-toolbar {
  grid-template-columns: minmax(220px, 1.8fr) repeat(4, minmax(110px, .7fr)) auto;
  gap: 12px;
  margin: 14px 0 12px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

#page-resources .resource-toolbar input,
#page-resources .resource-toolbar select,
#page-resources .resource-toolbar button {
  min-height: 40px;
  height: 40px;
  margin: 0;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-control);
  background: var(--ds-surface);
}

#page-resources .resource-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--ds-border);
}

#page-resources .resource-card {
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 6px 13px;
  min-width: 0;
  border: 0;
  border-bottom: 1px solid var(--ds-border);
  border-radius: 0;
  background: transparent;
  padding: 14px 2px;
}

#page-resources .resource-card::before {
  display: none;
}

#page-resources .resource-card:hover {
  background: #fbfcff;
}

#page-resources .resource-card-file-icon {
  grid-row: 1 / span 5;
}

#page-resources .resource-card-head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

#page-resources .resource-card h3 {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}

#page-resources .resource-meta-row {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-resources .resource-summary {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

#page-resources .resource-details {
  border-top: 1px solid #edf0f5;
  margin-top: 4px;
  padding-top: 6px;
}

#page-resources .resource-details summary {
  color: var(--ds-brand-strong);
  font-size: 12px;
}

#page-resources .resource-tags span,
#page-resources .resource-kind-badge,
#page-resources .resource-status {
  font-size: 10px;
}

#page-resources .resource-favorite-button {
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ds-text-faint);
  font-size: 18px;
  line-height: 1;
}

#page-resources .resource-favorite-button.active {
  color: var(--ds-brand);
}

#page-resources .resource-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

#page-resources .resource-card-actions button,
#page-resources .resource-file-actions button {
  min-height: 30px;
  padding: 4px 7px;
  border-color: transparent;
  background: transparent;
  color: var(--ds-brand-strong);
  font-size: 12px;
}

#page-resources .resource-card-actions button:hover,
#page-resources .resource-file-actions button:hover {
  background: var(--ds-brand-soft);
}

#page-resources .resource-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid #edf0f5;
}

#page-resources .resource-file-row > div:first-child {
  min-width: 0;
}

#page-resources .resource-file-row strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-resources .resource-file-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 3px;
}

#page-resources .resource-updated {
  color: var(--ds-text-faint);
}

.resource-upload-status {
  margin: 8px 0 0;
  color: var(--ds-text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.resource-upload-status[data-state="uploading"] { color: var(--ds-brand-strong); }
.resource-upload-status[data-state="success"] { color: var(--ds-success); }
.resource-upload-status[data-state="warning"] { color: var(--ds-warning); }
.resource-upload-status[data-state="error"] { color: var(--ds-danger); }

@media (max-width: 1180px) {
  #page-resources .resource-toolbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #page-resources .resource-toolbar .search-input {
    grid-column: span 2;
  }

  #page-resources .resource-quick-card:nth-child(2n) {
    border-right: 0;
  }

  #page-resources .resource-quick-card:nth-child(n + 3) {
    border-top: 1px solid var(--ds-border);
  }
}

@media (max-width: 768px) {
  #page-resources .resource-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #page-resources .resource-library-layout {
    grid-template-columns: 1fr;
  }

  #page-resources .resource-folder-panel {
    position: static;
  }

  #page-resources .resource-folder-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #page-resources .resource-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #page-resources .resource-toolbar .search-input {
    grid-column: 1 / -1;
  }

  #page-resources .resource-card {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  #page-resources .resource-card-head,
  #page-resources .resource-updated {
    grid-column: 2;
  }

  #page-resources .resource-card-actions,
  #page-resources .resource-file-row,
  #page-resources .resource-details,
  #page-resources .resource-tags,
  #page-resources .resource-meta-row,
  #page-resources .resource-summary {
    grid-column: 2;
  }
}

@media (max-width: 430px) {
  #page-resources .resource-toolbar {
    grid-template-columns: 1fr;
  }

  #page-resources .resource-toolbar .search-input {
    grid-column: auto;
  }

  #page-resources .resource-folder-list {
    grid-template-columns: 1fr;
  }

  #page-resources .resource-card {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
  }

  #page-resources .resource-file-row {
    align-items: flex-start;
    flex-direction: column;
  }
}


#page-automation .automation-capabilities-panel {
  margin-bottom: 16px;
}

#page-automation #automationStats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

#page-automation .automation-capabilities-panel > .panel-head {
  align-items: center;
}

#page-automation .automation-connection-status {
  color: var(--ds-text-muted);
  font-size: 11px;
  font-weight: 750;
}

#page-automation .automation-connection-status.ready {
  color: var(--ds-success);
}

#page-automation .automation-connection-status.inactive {
  color: var(--ds-warning);
}

#page-automation .agent-capability-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

#page-automation .agent-capability-card {
  display: grid;
  min-width: 0;
  gap: 9px;
  border-top: 2px solid var(--ds-border-strong);
  background: var(--ds-surface-subtle);
  padding: 14px;
}

#page-automation .agent-capability-card.available {
  border-top-color: var(--ds-brand);
}

#page-automation .agent-capability-card.inactive {
  border-top-color: var(--ds-warning);
}

#page-automation .agent-capability-card header,
#page-automation .agent-capability-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

#page-automation .agent-capability-mark,
#page-automation .agent-capability-status,
#page-automation .automation-status-pill,
#page-automation .automation-rule-state,
#page-automation .automation-run-kind {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

#page-automation .agent-capability-mark,
#page-automation .automation-run-kind {
  background: var(--ds-surface-muted);
  color: var(--ds-text-faint);
  letter-spacing: .08em;
}

#page-automation .agent-capability-status.ready,
#page-automation .automation-rule-state.on,
#page-automation .automation-status-pill.applied,
#page-automation .automation-status-pill.approved,
#page-automation .automation-run-status.completed {
  background: var(--ds-success-soft);
  color: var(--ds-success);
}

#page-automation .agent-capability-status.inactive,
#page-automation .automation-rule-state.off,
#page-automation .automation-status-pill.pending,
#page-automation .automation-run-status.running {
  background: var(--ds-brand-soft);
  color: var(--ds-brand-strong);
}

#page-automation .automation-status-pill.rejected,
#page-automation .automation-run-status.failed {
  background: var(--ds-danger-soft);
  color: var(--ds-danger);
}

#page-automation .automation-run-status.drafted {
  background: var(--ds-warning-soft);
  color: var(--ds-warning);
}

#page-automation .automation-run-status.skipped,
#page-automation .automation-status-pill.acknowledged {
  background: var(--ds-surface-muted);
  color: var(--ds-text-muted);
}

#page-automation .agent-capability-card h3 {
  margin: 0;
  color: var(--ds-text);
  font-size: 15px;
}

#page-automation .agent-capability-card p {
  min-height: 48px;
  margin: 0;
  color: var(--ds-text-secondary);
  font-size: 12px;
  line-height: 1.6;
}

#page-automation .agent-capability-card dl,
#page-automation .agent-task-item dl {
  display: grid;
  gap: 6px;
  margin: 0;
}

#page-automation .agent-capability-card dl > div,
#page-automation .agent-task-item dl > div {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  gap: 7px;
  min-width: 0;
}

#page-automation .agent-capability-card dt,
#page-automation .agent-task-item dt {
  color: var(--ds-text-faint);
  font-size: 10px;
}

#page-automation .agent-capability-card dd,
#page-automation .agent-task-item dd {
  overflow: hidden;
  margin: 0;
  color: var(--ds-text-secondary);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-automation .agent-capability-card footer {
  align-items: flex-end;
  border-top: 1px solid var(--ds-border);
  padding-top: 9px;
}

#page-automation .agent-capability-card footer > span {
  color: var(--ds-text-faint);
  font-size: 10px;
  line-height: 1.4;
}

#page-automation .agent-capability-card footer button {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 10px;
}

#page-automation .automation-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
  align-items: start;
  gap: 16px;
}

#page-automation .automation-rules-panel,
#page-automation .automation-runs-panel {
  grid-column: 1 / -1;
}

#page-automation .automation-rules-panel > .panel-head {
  align-items: center;
}

#page-automation .automation-rules-panel > .panel-head select,
#page-automation .automation-runs-panel > .panel-head select {
  min-width: 140px;
}

#page-automation .automation-rule-list,
#page-automation .automation-run-list,
#page-automation .automation-suggestion-list,
#page-automation .anomaly-report-list,
#page-automation .agent-task-list {
  display: grid;
}

#page-automation .automation-rule-item,
#page-automation .automation-run-item,
#page-automation .automation-suggestion,
#page-automation .anomaly-item,
#page-automation .agent-task-item {
  min-width: 0;
  border-top: 1px solid var(--ds-border);
  padding: 13px 0;
}

#page-automation .automation-rule-item:first-child,
#page-automation .automation-run-item:first-child,
#page-automation .automation-suggestion:first-child,
#page-automation .anomaly-item:first-child,
#page-automation .agent-task-item:first-child {
  border-top: 0;
}

#page-automation .automation-rule-item > header,
#page-automation .automation-rule-item > footer,
#page-automation .automation-suggestion > header,
#page-automation .automation-suggestion > footer,
#page-automation .anomaly-item > header,
#page-automation .anomaly-item > footer,
#page-automation .agent-task-item > header,
#page-automation .agent-task-item > footer,
#page-automation .automation-run-item > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

#page-automation .automation-rule-item .toggle-row {
  align-items: flex-start;
  min-width: 0;
}

#page-automation .automation-rule-item .toggle-row span {
  min-width: 0;
}

#page-automation .automation-rule-item .toggle-row strong,
#page-automation .automation-rule-item .toggle-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-automation .automation-rule-item .toggle-row strong {
  color: var(--ds-text);
  font-size: 13px;
}

#page-automation .automation-rule-item .toggle-row small {
  margin-top: 3px;
  color: var(--ds-text-muted);
  font-size: 11px;
}

#page-automation .automation-rule-item > header > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

#page-automation .automation-rule-spec {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 11px 0 9px 28px;
}

#page-automation .automation-rule-spec span {
  display: grid;
  gap: 3px;
  color: var(--ds-text-secondary);
  font-size: 11px;
}

#page-automation .automation-rule-spec b {
  color: var(--ds-text-faint);
  font-size: 10px;
  font-weight: 700;
}

#page-automation .automation-rule-item > footer {
  margin-left: 28px;
  color: var(--ds-text-faint);
  font-size: 10px;
}

#page-automation .automation-rule-item > footer strong {
  max-width: 60%;
  overflow: hidden;
  color: var(--ds-text-secondary);
  font-size: 10px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-automation .automation-suggestion > header > span:last-child,
#page-automation .anomaly-item > header > span,
#page-automation .agent-task-item > header > div > span:last-child {
  color: var(--ds-text-faint);
  font-size: 10px;
}

#page-automation .automation-suggestion > strong,
#page-automation .anomaly-item > header > strong,
#page-automation .agent-task-item > header > strong {
  display: block;
  margin-top: 6px;
  color: var(--ds-text);
  font-size: 13px;
}

#page-automation .automation-suggestion > p,
#page-automation .automation-suggestion > small,
#page-automation .anomaly-item > p,
#page-automation .agent-task-item > p,
#page-automation .automation-run-item > p {
  margin: 5px 0 0;
  color: var(--ds-text-secondary);
  font-size: 11px;
  line-height: 1.6;
}

#page-automation .automation-suggestion > small,
#page-automation .automation-run-item > small {
  display: block;
  color: var(--ds-text-faint);
  font-size: 10px;
}

#page-automation .automation-suggestion > footer,
#page-automation .anomaly-item > footer,
#page-automation .agent-task-item > footer {
  justify-content: flex-end;
  margin-top: 9px;
}

#page-automation .automation-suggestion > footer button,
#page-automation .anomaly-item > footer button,
#page-automation .agent-task-item > footer button {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 10px;
}

#page-automation .anomaly-item {
  padding-left: 10px;
  border-left: 3px solid var(--ds-border);
}

#page-automation .anomaly-item.attention {
  border-left-color: var(--ds-warning);
  background: var(--ds-warning-soft);
  padding-left: 11px;
}

#page-automation .anomaly-item.risk {
  border-left-color: var(--ds-danger);
  background: var(--ds-danger-soft);
  padding-left: 11px;
}

#page-automation .anomaly-item.info {
  border-left-color: var(--ds-brand);
  background: var(--ds-brand-soft);
  padding-left: 11px;
}

#page-automation .anomaly-item > p b {
  display: inline-block;
  min-width: 38px;
  color: var(--ds-text);
  font-weight: 800;
}

#page-automation .agent-task-item.approved,
#page-automation .agent-task-item.handed_off {
  background: var(--ds-success-soft);
}

#page-automation .agent-task-item.rejected {
  opacity: .68;
}

#page-automation .agent-task-item dl {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 10px;
}

#page-automation .agent-task-item dl > div {
  grid-template-columns: 1fr;
  gap: 2px;
}

#page-automation .automation-run-item > header {
  align-items: center;
}

#page-automation .automation-run-item > header > div {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
}

#page-automation .automation-run-item > header strong {
  overflow: hidden;
  color: var(--ds-text-secondary);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-automation .automation-run-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

#page-automation .automation-run-error {
  margin-top: 7px;
  border-left: 2px solid var(--ds-danger);
  background: var(--ds-danger-soft);
  padding: 7px 9px;
  color: var(--ds-danger);
  font-size: 10px;
  line-height: 1.5;
}

@media (max-width: 1080px) {
  #page-automation #automationStats,
  #page-automation .agent-capability-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  #page-automation .automation-layout {
    grid-template-columns: 1fr;
  }

  #page-automation .automation-rule-spec {
    grid-template-columns: 1fr;
    margin-left: 28px;
  }
}

@media (max-width: 620px) {
  #page-automation #automationStats,
  #page-automation .agent-capability-list {
    grid-template-columns: 1fr;
  }

  #page-automation .agent-capability-card p {
    min-height: 0;
  }

  #page-automation .automation-rule-item > header,
  #page-automation .automation-suggestion > header,
  #page-automation .anomaly-item > header,
  #page-automation .agent-task-item > header,
  #page-automation .automation-run-item > header {
    align-items: stretch;
    flex-direction: column;
  }

  #page-automation .automation-rule-item > header > div {
    justify-content: flex-start;
  }

  #page-automation .automation-rule-spec,
  #page-automation .automation-rule-item > footer {
    margin-left: 0;
  }

  #page-automation .automation-rule-item > footer {
    align-items: flex-start;
    flex-direction: column;
  }

  #page-automation .automation-rule-item > footer strong {
    max-width: 100%;
  }

  #page-automation .agent-task-item dl {
    grid-template-columns: 1fr;
  }

  #page-automation .automation-runs-panel > .panel-head select {
    width: 100%;
  }
}

/* Achievement wall: browse-first archive with isolated management controls. */
#page-honors {
  display: none;
  gap: 24px;
}

#page-honors.active {
  display: grid;
}

.achievement-page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.achievement-page-heading > div:first-child {
  display: grid;
  gap: 5px;
}

.achievement-page-heading .page-heading-note {
  max-width: 680px;
  margin: 0;
  color: var(--ds-text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.achievement-overview {
  display: grid;
  grid-template-columns: minmax(300px, 1.7fr) repeat(3, minmax(150px, 1fr));
  gap: 16px;
}

.achievement-overview article {
  display: grid;
  align-content: center;
  min-height: 132px;
  border: 1px solid #e4e8f2;
  border-radius: 16px;
  background: #fff;
  padding: 20px 22px;
}

.achievement-overview article > span,
.achievement-detail-facts span,
.achievement-story-section > span,
.achievement-sensitive-summary span {
  color: var(--ds-text-muted);
  font-size: 12px;
  font-weight: 700;
}

.achievement-overview article > strong {
  margin: 6px 0 2px;
  color: #2f3564;
  font-size: 28px;
  line-height: 1;
}

.achievement-overview article > p {
  margin: 5px 0 0;
  color: #7c849d;
  font-size: 13px;
}

.achievement-overview .achievement-overview-main {
  border-color: #dcdffd;
  background: linear-gradient(135deg, #f2f3ff, #e9ecff);
}

.achievement-overview .achievement-overview-main > span,
.achievement-overview .achievement-overview-main > strong {
  color: #5c60c7;
}

#page-honors .module-switch {
  width: min(720px, 100%);
  margin: 0;
}

#page-honors .module-switch button {
  min-height: 48px;
}

#page-honors .module-switch button small {
  display: inline-grid;
  min-width: 24px;
  min-height: 22px;
  place-items: center;
  border-radius: 999px;
  background: #eef0f7;
  color: var(--ds-text-muted);
  padding: 0 7px;
}

#page-honors .module-switch button.active small {
  background: #e2e5ff;
  color: #5559bd;
}

.achievement-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1.8fr) repeat(4, minmax(120px, 0.8fr)) auto;
  align-items: end;
  gap: 12px;
  padding: 16px 18px;
}

.achievement-toolbar label,
.achievement-batch-bar label,
.achievement-editor-body label {
  display: grid;
  gap: 6px;
  color: #4b526a;
  font-size: 12px;
  font-weight: 700;
}

.achievement-toolbar input,
.achievement-toolbar select,
.achievement-toolbar button,
.achievement-batch-bar select,
.achievement-batch-bar button {
  min-height: 42px;
}

.achievement-batch-bar {
  position: sticky;
  top: 76px;
  z-index: 8;
  display: flex;
  align-items: end;
  gap: 12px;
  border: 1px solid #d7daf9;
  border-radius: 14px;
  background: rgba(245, 246, 255, 0.96);
  padding: 12px 16px;
  box-shadow: 0 10px 24px rgba(62, 68, 139, 0.08);
  backdrop-filter: blur(10px);
}

.achievement-batch-bar > strong {
  align-self: center;
  margin-right: auto;
  color: #5559bd;
}

#honorStatus:empty {
  display: none;
}

#page-honors .honor-wall,
#page-honors .showcase-record-list {
  display: grid;
  min-width: 0;
  gap: 16px;
}

#page-honors .honor-wall.hidden,
#page-honors .showcase-record-list.hidden {
  display: none;
}

#page-honors .honor-section-grid {
  display: grid;
  grid-template-columns: repeat(var(--honor-columns), minmax(min(100%, 280px), 1fr));
  gap: 18px;
}

.achievement-card {
  position: relative;
  min-width: 0;
  overflow: visible;
  border-color: #e3e7f1;
  border-radius: 16px;
  background: #fff;
  padding: 14px;
  box-shadow: 0 8px 24px rgba(42, 48, 76, 0.045);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.achievement-card:hover,
.achievement-card:focus-visible,
.achievement-card:focus-within {
  border-color: #cfd3f8;
  box-shadow: 0 14px 32px rgba(61, 65, 133, 0.11);
  transform: translateY(-2px);
}

.achievement-card:focus-visible {
  outline: 3px solid rgba(101, 105, 209, .28);
  outline-offset: 3px;
}

.achievement-card.is-pinned {
  border-left: 3px solid #696dd3;
}

.achievement-card.is-dragging {
  opacity: .55;
}

.achievement-card.is-managing {
  cursor: grab;
}

.achievement-card .certificate-frame {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-color: #e5e8f0;
  border-radius: 12px;
  background: #f8f9fc;
}

.achievement-card .certificate-preview-btn,
.achievement-card .certificate-image,
.achievement-card .certificate-placeholder {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.achievement-card .certificate-image {
  aspect-ratio: auto;
  object-fit: contain;
}

.certificate-private {
  align-content: center;
  gap: 6px;
  background: linear-gradient(145deg, #f5f6fa, #eceef6);
}

.certificate-private > span {
  color: #7378c9;
  font-size: 26px;
}

.certificate-private > strong {
  color: #4e546b;
}

.certificate-private > small {
  color: #8b91a6;
}

.honor-card-top {
  min-height: 30px;
  justify-content: flex-start;
}

.achievement-kind-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  background: #eef0ff;
  color: #5c60c7;
  font-weight: 900;
}

.honor-type-pill {
  border-color: #e0e3ec;
  background: #f8f9fb;
}

.achievement-state-badge,
.achievement-featured-badge,
.showcase-story-meta b {
  border-radius: 999px;
  background: #eef0ff;
  color: #5d61c4;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
}

.achievement-state-badge {
  margin-left: auto;
}

.honor-public-info {
  gap: 9px;
  padding: 2px 2px 4px;
}

.honor-public-info > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.achievement-card-date {
  color: #7b8299;
  font-size: 12px;
  font-weight: 700;
}

.honor-public-info h4,
.showcase-story-content h3 {
  overflow: hidden;
  margin: 0;
  color: #292f46;
  font-size: 17px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.honor-public-info > p {
  overflow: hidden;
  margin: 0;
  color: #697187;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.achievement-card-actions {
  position: absolute;
  z-index: 6;
  top: 52px;
  right: 22px;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease;
}

.achievement-card:hover .achievement-card-actions,
.achievement-card:focus-within .achievement-card-actions,
.honor-manage-mode .achievement-card-actions {
  opacity: 1;
  pointer-events: auto;
}

.achievement-card-actions > button,
.achievement-more-menu > summary {
  display: grid;
  min-width: 48px;
  min-height: 38px;
  place-items: center;
  border: 1px solid #dfe2ee;
  border-radius: 10px;
  background: rgba(255, 255, 255, .95);
  color: #4f566e;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 5px 15px rgba(41, 47, 70, .1);
  list-style: none;
}

.achievement-more-menu {
  position: relative;
}

.achievement-more-menu > summary::-webkit-details-marker {
  display: none;
}

.achievement-more-menu > div {
  position: absolute;
  z-index: 9;
  top: calc(100% + 6px);
  right: 0;
  display: grid;
  width: 170px;
  gap: 4px;
  border: 1px solid #e1e4ec;
  border-radius: 12px;
  background: #fff;
  padding: 6px;
  box-shadow: 0 16px 36px rgba(36, 42, 68, .16);
}

.achievement-more-menu > div button {
  justify-content: flex-start;
  min-height: 38px;
  border: 0;
  background: transparent;
  box-shadow: none;
  text-align: left;
}

.achievement-select-control {
  position: absolute;
  z-index: 7;
  top: 18px;
  right: 18px;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  border: 1px solid #dfe2ee;
  border-radius: 10px;
  background: #fff;
  padding: 5px 9px;
  box-shadow: 0 5px 15px rgba(41, 47, 70, .08);
}

.achievement-select-control input {
  width: 18px;
  height: 18px;
}

.showcase-story-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.showcase-record-card {
  display: grid;
  grid-template-columns: minmax(180px, .8fr) minmax(220px, 1.2fr);
  gap: 16px;
  padding: 14px;
}

.showcase-story-cover {
  min-width: 0;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  background: #f5f6fb;
}

.showcase-media-item {
  display: grid;
  gap: 7px;
  margin: 0;
}

.showcase-media-item.cover,
.showcase-media-item.cover img,
.showcase-media-item.cover video {
  width: 100%;
  height: 100%;
}

.showcase-media-item.cover img,
.showcase-media-item.cover video {
  object-fit: cover;
}

.showcase-media-item img,
.showcase-media-item video {
  display: block;
  max-width: 100%;
  border-radius: 12px;
  background: #11131b;
}

.showcase-media-item figcaption {
  color: #737a90;
  font-size: 12px;
}

.showcase-private-media,
.showcase-cover-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 180px;
  align-content: center;
  justify-items: center;
  gap: 7px;
  background: linear-gradient(145deg, #f0f1ff, #e8eaf9);
  color: #5e63bf;
  padding: 18px;
  text-align: center;
}

.showcase-cover-placeholder > span {
  font-size: 30px;
}

.showcase-cover-placeholder small,
.showcase-private-media span {
  color: #777e98;
}

.showcase-story-content {
  display: grid;
  align-content: center;
  min-width: 0;
  gap: 10px;
}

.showcase-story-meta,
.showcase-story-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.showcase-story-meta > span,
.showcase-story-facts > span {
  color: #72798f;
  font-size: 12px;
}

.showcase-story-result {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: #525a72;
  font-size: 14px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.achievement-detail-drawer {
  width: min(760px, calc(100vw - 40px));
  max-height: calc(100vh - 24px);
  margin-left: auto;
  border-radius: 18px 0 0 18px;
}

.achievement-detail-body {
  display: grid;
  gap: 18px;
}

.achievement-detail-hero .certificate-frame {
  overflow: hidden;
  max-height: 440px;
  border-radius: 14px;
  background: #f6f7fb;
}

.achievement-detail-hero .certificate-image {
  max-height: 440px;
  object-fit: contain;
}

.achievement-detail-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.achievement-detail-facts article,
.achievement-sensitive-summary > div {
  display: grid;
  gap: 5px;
  border: 1px solid #e4e7ef;
  border-radius: 12px;
  background: #fafbfc;
  padding: 12px;
}

.achievement-detail-facts strong,
.achievement-sensitive-summary strong {
  overflow-wrap: anywhere;
  color: #30364c;
  font-size: 14px;
}

.achievement-story-section {
  display: grid;
  gap: 7px;
  border-left: 3px solid #d8daf8;
  padding-left: 14px;
}

.achievement-story-section p {
  margin: 0;
  color: #4f566d;
  line-height: 1.75;
  white-space: pre-wrap;
}

.achievement-sensitive-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.showcase-detail-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.showcase-detail-gallery .showcase-media-item:first-child:nth-last-child(odd) {
  grid-column: 1 / -1;
}

.achievement-association-groups {
  display: grid;
  gap: 10px;
}

.achievement-association-groups > div {
  display: grid;
  gap: 7px;
}

.achievement-association-groups p {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
}

.achievement-association-groups p span {
  border-radius: 999px;
  background: #f0f1fb;
  color: #555b85;
  padding: 6px 10px;
}

.achievement-detail-empty {
  display: grid;
  gap: 4px;
  border: 1px dashed #d5d9e5;
  border-radius: 12px;
  color: #7b8298;
  padding: 16px;
}

.achievement-detail-empty strong {
  color: #4a5168;
}

.achievement-editor-modal {
  width: min(940px, calc(100vw - 32px));
}

.achievement-editor-body {
  display: grid;
  gap: 16px;
}

.achievement-editor-body .form-row {
  align-items: start;
}

.achievement-sensitive-fields,
.achievement-link-editor,
.achievement-media-editor {
  display: grid;
  gap: 12px;
  border: 1px solid #e4e7f0;
  border-radius: 14px;
  background: #fafbfe;
  padding: 16px;
}

.achievement-sensitive-fields > div:first-child,
.achievement-link-editor > div:first-child,
.achievement-media-editor > div:first-child {
  display: grid;
  gap: 3px;
}

.achievement-sensitive-fields > div:first-child span,
.achievement-link-editor > div:first-child span,
.achievement-media-editor > div:first-child span {
  color: #747b91;
  font-size: 12px;
}

.achievement-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 14px;
}

.achievement-check-grid .inline-check {
  display: flex;
  min-height: 40px;
  align-items: center;
}

.showcase-media-draft-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.showcase-media-draft-list > article {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border: 1px solid #e2e5ed;
  border-radius: 11px;
  background: #fff;
  padding: 8px;
}

.showcase-media-draft-list img,
.showcase-media-draft-list video {
  width: 64px;
  height: 52px;
  border-radius: 7px;
  object-fit: cover;
  background: #12141d;
}

.showcase-media-draft-list > article > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.showcase-media-draft-list strong,
.showcase-media-draft-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.showcase-media-draft-list span,
.showcase-media-draft-list > p {
  color: #7a8196;
  font-size: 12px;
}

@media (max-width: 1180px) {
  .achievement-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .achievement-toolbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .achievement-search-field {
    grid-column: span 2;
  }

  #page-honors .honor-section-grid,
  .showcase-story-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 760px) {
  #page-honors {
    gap: 16px;
  }

  .achievement-page-heading,
  .achievement-batch-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .achievement-page-heading .page-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .achievement-page-heading .page-actions .primary {
    grid-column: 1 / -1;
  }

  .achievement-overview {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .achievement-overview article {
    min-height: 112px;
    padding: 16px;
  }

  .achievement-overview .achievement-overview-main {
    grid-column: 1 / -1;
  }

  #page-honors .module-switch {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #page-honors .module-switch button {
    min-width: 0;
    padding: 9px 6px;
  }

  .achievement-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .achievement-search-field {
    grid-column: 1 / -1;
  }

  .achievement-toolbar > button {
    grid-column: 1 / -1;
  }

  #page-honors .honor-section-grid,
  .showcase-story-grid,
  .achievement-detail-facts,
  .achievement-sensitive-summary,
  .showcase-detail-gallery {
    grid-template-columns: 1fr;
  }

  .showcase-detail-gallery .showcase-media-item:first-child:nth-last-child(odd) {
    grid-column: auto;
  }

  .achievement-detail-drawer {
    width: 100%;
    max-height: min(90vh, 820px);
    margin: auto 0 0;
    border-radius: 16px 16px 0 0;
  }

  .achievement-check-grid,
  .showcase-media-draft-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .achievement-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .achievement-overview .achievement-overview-main {
    grid-column: 1 / -1;
  }

  .achievement-toolbar {
    grid-template-columns: 1fr;
  }

  .achievement-search-field,
  .achievement-toolbar > button {
    grid-column: auto;
  }

  #page-honors .honor-section-grid,
  .showcase-story-grid {
    grid-template-columns: 1fr;
  }

  .achievement-card-actions {
    top: 50px;
    right: 18px;
  }

  .achievement-page-heading .page-actions {
    grid-template-columns: 1fr;
  }

  .achievement-page-heading .page-actions .primary {
    grid-column: auto;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden],
.hidden {
  display: none !important;
}

html {
  background: var(--admin-bg);
}

body {
  overflow-x: hidden;
  background: var(--admin-bg);
  color: var(--admin-ink);
  letter-spacing: 0;
}

body.nav-open {
  overflow: hidden;
}

button,
.button-link {
  min-height: 40px;
  border-color: var(--admin-line);
  border-radius: 9px;
  background: var(--admin-surface);
  color: var(--ds-text-secondary);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
}

button:hover,
.button-link:hover {
  border-color: #bfc5d2;
  background: var(--ds-surface-subtle);
}

button.primary,
.button-link.primary {
  border-color: var(--admin-primary);
  background: var(--admin-primary);
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08), 0 3px 8px rgba(70, 95, 255, 0.18);
}

button.primary:hover,
.button-link.primary:hover {
  border-color: var(--admin-primary-dark);
  background: var(--admin-primary-dark);
}

button.danger {
  border-color: #fecdca;
  color: var(--admin-danger);
}

button:focus-visible,
.button-link:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(70, 95, 255, 0.2);
  outline-offset: 2px;
}

input,
textarea,
select {
  min-height: 42px;
  border-color: var(--admin-line-strong);
  border-radius: 9px;
  background: var(--admin-surface);
  color: var(--admin-ink);
  padding: 9px 12px;
}

textarea {
  min-height: 92px;
}

input::placeholder,
textarea::placeholder {
  color: var(--ds-text-faint);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 4px rgba(70, 95, 255, 0.12);
}

label {
  color: var(--ds-text-secondary);
  font-size: 13px;
  font-weight: 600;
}

.todo-check {
  position: relative;
}

.todo-check input {
  width: 22px;
  min-height: 0;
  height: 22px;
  padding: 0;
}

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

.app-nav {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  display: flex;
  width: 272px;
  height: 100vh;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
  border-right: 1px solid var(--admin-line);
  background: var(--admin-surface);
  padding: 22px 16px 18px;
  box-shadow: none;
}

.brand {
  gap: 11px;
  padding: 0 6px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(145deg, #6378ff, #3546d3);
  color: #ffffff;
  box-shadow: 0 8px 16px rgba(70, 95, 255, 0.22);
}

.brand strong {
  color: var(--ds-text);
  font-size: 15px;
  font-weight: 700;
}

.brand span {
  color: var(--admin-muted);
  font-size: 12px;
}

.workspace-chip {
  min-height: 40px;
  border: 1px solid var(--ds-brand-soft-strong);
  border-radius: 10px;
  background: var(--ds-brand-soft);
  color: #4d5bb7;
  padding: 0 12px;
}

.status-dot {
  background: var(--admin-success);
  box-shadow: 0 0 0 4px rgba(18, 183, 106, 0.12);
}

.nav-list {
  display: grid;
  gap: 18px;
}

.nav-section {
  display: grid;
  gap: 5px;
}

.nav-section-label {
  display: block;
  margin: 0 10px 4px;
  color: var(--ds-text-faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-btn {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: flex-start;
  gap: 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ds-text-secondary);
  font-weight: 600;
  padding: 0 11px;
  box-shadow: none;
}

.nav-btn:hover {
  background: var(--ds-surface-muted);
  color: #1d2939;
}

.nav-btn.active {
  background: var(--admin-primary-soft);
  color: var(--admin-primary-dark);
  font-weight: 700;
}

.nav-icon {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  border-radius: 7px;
  background: var(--ds-surface-muted);
  color: var(--ds-text-muted);
}

.nav-btn.active .nav-icon {
  background: #dfe4ff;
  color: var(--admin-primary-dark);
}

.nav-foot {
  margin-top: auto;
  border: 1px solid var(--admin-line);
  border-radius: 11px;
  background: var(--admin-surface-soft);
  padding: 12px;
}

.nav-foot strong {
  color: var(--ds-text-secondary);
}

.nav-foot span {
  color: var(--admin-muted);
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(16, 24, 40, 0.42);
  backdrop-filter: blur(2px);
}

.app-main {
  min-width: 0;
  margin-left: 272px;
}

.workspace-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--admin-line);
  background: rgba(255, 255, 255, 0.92);
  padding: 12px 32px;
  backdrop-filter: blur(16px);
}

.workspace-heading {
  margin-right: auto;
}

.workspace-heading span {
  color: var(--admin-muted);
  font-size: 12px;
}

.workspace-heading strong {
  color: var(--ds-text);
  font-size: 18px;
}

.workspace-heading strong::before {
  display: none;
}

.workspace-tools {
  gap: 14px;
  color: var(--admin-muted);
}

.workspace-avatar {
  width: 34px;
  height: 34px;
  border: 0;
  background: var(--admin-primary-soft);
  color: var(--admin-primary-dark);
}

.mobile-nav-toggle {
  display: none;
  width: 42px;
  flex: 0 0 42px;
  padding: 0;
  font-size: 20px;
}

.page,
#page-home {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 28px 32px 48px;
}

.page-heading,
.page-heading-centered {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, auto) minmax(0, 1fr);
  min-height: auto;
  align-items: start;
  justify-items: center;
  margin-bottom: 22px;
  text-align: center;
}

.page-heading > .eyebrow,
.page-heading > h2,
.page-heading > .page-heading-note {
  grid-column: 2;
}

.page-heading h2 {
  color: var(--ds-text);
  font-size: clamp(26px, 2.4vw, 34px);
  letter-spacing: -0.03em;
}

.page-heading .eyebrow {
  color: var(--admin-primary);
}

.page-actions {
  position: static;
  grid-column: 3;
  grid-row: 1 / span 3;
  align-self: center;
  justify-self: end;
  margin-left: auto;
  transform: none;
}

.panel,
.home-overview > .panel,
.home-profile-panel,
.kb-layout,
.exam-paper,
.review-paper,
.annual-section {
  border: 1px solid var(--admin-line);
  border-radius: var(--admin-radius);
  background: var(--admin-surface);
  box-shadow: var(--admin-shadow);
}

#page-home .panel,
#page-home .home-profile-panel,
#page-home .carousel-shell,
#page-home .home-command-bar {
  border-radius: 16px;
}

.panel,
.home-overview > .panel {
  padding: 20px;
}

.panel-head {
  margin-bottom: 16px;
}

.panel-head h2 {
  color: #1d2939;
  font-size: 16px;
}

.panel-head span {
  color: var(--admin-muted);
}

.home-overview {
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 22px;
}

.home-profile-panel {
  min-height: 0;
  border-color: #dfe4ff;
  background: linear-gradient(135deg, #ffffff 0%, #f7f8ff 100%);
  padding: 26px;
}

.home-copy h2 {
  color: var(--ds-text);
  font-size: clamp(34px, 4vw, 52px);
}

.hero-lead,
.home-copy p,
.muted {
  color: var(--admin-muted);
}

.chip {
  border: 1px solid #dfe4ff;
  background: #f4f6ff;
  color: #4554b8;
}

.metric-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}

.metric {
  min-height: 106px;
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  background: var(--admin-surface);
  padding: 16px;
  box-shadow: none;
}

.metric span,
.metric small {
  color: var(--admin-muted);
}

.metric strong {
  color: var(--ds-text);
}

.table-toolbar {
  gap: 10px;
  border-radius: 10px;
  background: var(--admin-surface-soft);
  padding: 10px;
}

.inventory-layout {
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
}

.inventory-side {
  position: sticky;
  top: 94px;
  align-self: start;
}

.inventory-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--admin-line);
  border-radius: 10px;
}

.inventory-table {
  min-width: 980px;
}

.inventory-table th {
  background: var(--ds-surface-subtle);
  color: var(--ds-text-secondary);
  font-size: 12px;
  text-transform: none;
}

.inventory-table td {
  border-color: var(--ds-border);
}

.inventory-table input,
.inventory-table select {
  min-height: 36px;
  border-color: transparent;
  background: transparent;
  padding: 6px 8px;
}

.inventory-table input:hover,
.inventory-table select:hover,
.inventory-table input:focus,
.inventory-table select:focus {
  border-color: var(--admin-line-strong);
  background: #ffffff;
}

.inventory-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--admin-line);
  background: var(--ds-surface-subtle);
  padding: 12px;
}

.inventory-pagination span {
  color: var(--admin-muted);
  font-size: 13px;
}

.inventory-pagination-actions {
  display: flex;
  gap: 8px;
}

.inventory-pagination button {
  min-height: 34px;
}

.resource-library-panel {
  min-width: 0;
  margin-top: 0;
}

.resource-library-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-top: 18px;
}

.resource-folder-panel {
  position: sticky;
  top: 86px;
}

.resource-folder-head {
  align-items: center;
}

.resource-folder-head .icon-btn {
  width: 34px;
  min-height: 34px;
  padding: 0;
}

.resource-folder-list {
  display: grid;
  gap: 7px;
}

.resource-folder-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
  border-radius: 10px;
}

.resource-folder-row.active {
  background: var(--ds-brand-soft);
}

.resource-folder-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 42px;
  border: 0;
  background: transparent;
  color: var(--ds-text-secondary);
  text-align: left;
  padding: 8px 10px;
}

.resource-folder-item:hover,
.resource-folder-item.active,
.resource-folder-row.active .resource-folder-item {
  background: var(--ds-brand-soft);
  color: var(--admin-primary-dark);
}

.resource-folder-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-folder-item > span:last-child {
  color: var(--admin-muted);
  font-size: 12px;
}

.resource-folder-icon {
  color: #667eea;
  transform: rotate(90deg);
}

.resource-folder-actions {
  display: flex;
  gap: 2px;
  padding-right: 5px;
}

.resource-folder-actions button {
  width: 27px;
  min-height: 27px;
  border: 0;
  background: transparent;
  color: var(--ds-text-muted);
  padding: 0;
}

.resource-panel-head {
  margin-bottom: 14px;
}

.resource-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(150px, 190px) minmax(170px, 210px);
  margin-bottom: 18px;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.resource-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  border: 1px solid var(--admin-line);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 5px 14px rgba(16, 24, 40, 0.04);
  padding: 18px;
}

.resource-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--admin-primary);
  content: "";
}

.resource-kind-installer::before {
  background: var(--ds-brand);
}

.resource-kind-material::before {
  background: var(--ds-success);
}

.resource-kind-problem::before {
  background: var(--ds-warning);
}

.resource-card-head,
.resource-meta-row,
.resource-tags,
.resource-card-actions,
.resource-file-row,
.resource-attachment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.resource-card-head,
.resource-file-row,
.resource-attachment-meta {
  justify-content: space-between;
}

.resource-kind-badge,
.resource-status,
.resource-meta-row span,
.resource-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  border-radius: 999px;
  background: var(--ds-brand-soft);
  color: #3448c5;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 9px;
}

.resource-status.open {
  background: #fff7ed;
  color: var(--ds-warning);
}

.resource-status.resolved {
  background: var(--ds-success-soft);
  color: var(--ds-success);
}

.resource-card h3 {
  margin: 0;
  color: var(--admin-ink);
  font-size: 18px;
  line-height: 1.4;
}

.resource-meta-row,
.resource-tags,
.resource-card-actions {
  flex-wrap: wrap;
}

.resource-meta-row span,
.resource-tags span {
  min-height: 23px;
  background: var(--ds-surface-muted);
  color: var(--ds-text-secondary);
  font-size: 11px;
  font-weight: 600;
}

.resource-summary,
.resource-details-content,
.resource-solution p {
  margin: 0;
  color: var(--ds-text-secondary);
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.resource-details {
  border-top: 1px solid var(--ds-border);
  border-bottom: 1px solid var(--ds-border);
  padding: 10px 0;
}

.resource-details summary {
  cursor: pointer;
  color: var(--ds-text-secondary);
  font-size: 13px;
  font-weight: 700;
}

.resource-details-content {
  margin-top: 10px;
  font-size: 13px;
}

.resource-solution {
  margin-top: 12px;
  border-radius: 10px;
  background: var(--ds-surface-subtle);
  padding: 12px;
}

.resource-solution.resolved {
  background: var(--ds-success-soft);
}

.resource-solution.open {
  background: #fff7ed;
}

.resource-solution strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ds-text-secondary);
  font-size: 13px;
}

.resource-file-row {
  border-radius: 10px;
  background: #f8f9fc;
  padding: 10px 12px;
}

.resource-file-row > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.resource-file-row strong {
  overflow: hidden;
  color: var(--ds-text-secondary);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-file-row span,
.resource-updated {
  color: var(--ds-text-faint);
  font-size: 11px;
}

.resource-card-actions {
  margin-top: auto;
}

.resource-card-actions button {
  min-height: 34px;
}

.resource-updated {
  display: block;
}

.resource-empty-state {
  grid-column: 1 / -1;
  min-height: 260px;
}

.resource-modal-panel {
  width: min(820px, 100%);
}

.resource-modal-body {
  display: grid;
  gap: 14px;
}

.resource-form-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.resource-form-row:first-child {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.resource-problem-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  align-items: end;
  gap: 12px;
}

.resource-attachment-box {
  display: grid;
  gap: 9px;
  border: 1px dashed var(--ds-border-strong);
  border-radius: 12px;
  background: var(--ds-surface-subtle);
  padding: 14px;
}

.resource-attachment-meta {
  color: var(--ds-text-secondary);
  font-size: 13px;
}

.timetable-stats {
  margin-bottom: 18px;
}

.timetable-panel {
  overflow: hidden;
}

.timetable-toolbar {
  display: grid;
  grid-template-columns: auto minmax(190px, 240px) minmax(220px, 1fr);
  align-items: end;
  gap: 14px;
  margin-bottom: 18px;
}

.timetable-week-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.timetable-week-select-label {
  display: grid;
  gap: 5px;
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 700;
}

.timetable-term-meta {
  display: grid;
  justify-items: end;
  gap: 2px;
  text-align: right;
}

.timetable-term-meta strong {
  color: var(--admin-ink);
}

.timetable-term-meta span {
  color: var(--admin-muted);
  font-size: 12px;
}

.timetable-week-grid {
  display: grid;
  grid-template-columns: 58px repeat(7, minmax(0, 1fr));
  overflow: hidden;
  border-top: 1px solid var(--admin-line);
  border-left: 1px solid var(--admin-line);
  border-radius: 12px;
  background: #ffffff;
}

.timetable-grid-corner,
.timetable-day-head {
  min-width: 0;
  border-right: 1px solid var(--admin-line);
  border-bottom: 1px solid var(--admin-line);
  background: var(--ds-surface-subtle);
  padding: 9px 5px;
  text-align: center;
}

.timetable-grid-corner {
  display: grid;
  place-items: center;
  color: var(--admin-muted);
  font-size: 11px;
  font-weight: 700;
}

.timetable-day-head {
  display: grid;
  gap: 1px;
}

.timetable-day-head strong {
  color: var(--ds-text-secondary);
  font-size: 13px;
}

.timetable-day-head span {
  color: var(--ds-text-faint);
  font-size: 11px;
}

.timetable-day-head.is-today {
  background: var(--ds-brand-soft);
}

.timetable-day-head.is-today strong,
.timetable-day-head.is-today span {
  color: #3448c5;
}

.timetable-time-axis {
  position: relative;
  height: var(--timetable-grid-height);
  border-right: 1px solid var(--admin-line);
  border-bottom: 1px solid var(--admin-line);
  background: var(--ds-surface-subtle);
}

.timetable-time-axis span {
  position: absolute;
  top: var(--tick-top);
  right: 8px;
  color: var(--ds-text-faint);
  font-size: 10px;
  transform: translateY(-7px);
}

.timetable-day-lane {
  position: relative;
  height: var(--timetable-grid-height);
  min-width: 0;
  border-right: 1px solid var(--admin-line);
  border-bottom: 1px solid var(--admin-line);
  background-color: #ffffff;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent calc(var(--timetable-hour-height) - 1px),
    var(--admin-line) calc(var(--timetable-hour-height) - 1px),
    var(--admin-line) var(--timetable-hour-height)
  );
}

.timetable-day-lane.is-today {
  background-color: #fafbff;
}

.timetable-course {
  position: absolute;
  top: var(--course-top);
  right: 4px;
  left: 4px;
  z-index: 1;
  display: grid;
  align-content: start;
  gap: 2px;
  width: calc(100% - 8px);
  height: var(--course-height);
  min-height: 0;
  overflow: hidden;
  border-width: 1px 1px 1px 4px;
  border-radius: 8px;
  padding: 6px;
  text-align: left;
}

.timetable-course:hover {
  filter: brightness(0.98);
}

.timetable-course-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 3px;
  overflow: hidden;
  color: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  padding-right: 28px;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

a.timetable-course-title:hover {
  text-decoration: underline;
}

.timetable-course-title span {
  flex: 0 0 auto;
}

.timetable-course-edit {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 25px;
  min-height: 23px;
  border-color: transparent;
  background: rgba(255, 255, 255, 0.72);
  color: inherit;
  font-size: 0;
  padding: 0;
}

.timetable-course-edit::after {
  font-size: 13px;
  content: "⋯";
}

.timetable-course strong {
  overflow: hidden;
  font-size: 12px;
  line-height: 1.3;
  text-overflow: ellipsis;
}

.timetable-course span,
.timetable-course small {
  overflow: hidden;
  font-size: 10px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timetable-color-blue {
  --timetable-course-color: var(--ds-brand);
  border-color: #8098f9;
  background: var(--ds-brand-soft);
  color: #2538a8;
}

.timetable-color-green {
  --timetable-course-color: var(--ds-success);
  border-color: #6ce9a6;
  background: var(--ds-success-soft);
  color: var(--ds-success);
}

.timetable-color-purple {
  --timetable-course-color: var(--ds-brand);
  border-color: #bdb4fe;
  background: #f4f3ff;
  color: #5925dc;
}

.timetable-color-orange {
  --timetable-course-color: var(--ds-warning);
  border-color: #fec84b;
  background: #fffaeb;
  color: var(--ds-warning);
}

.timetable-color-red {
  --timetable-course-color: #f04438;
  border-color: #fda29b;
  background: #fef3f2;
  color: var(--ds-danger);
}

.timetable-color-cyan {
  --timetable-course-color: #06aed4;
  border-color: #67e3f9;
  background: #ecfdff;
  color: #0e7090;
}

.timetable-empty-state {
  min-height: 180px;
  margin-top: 16px;
}

.timetable-mobile-view {
  display: none;
}

.timetable-settings-panel {
  margin-top: 18px;
}

.timetable-learning-hub {
  margin-top: 18px;
}

.timetable-learning-panel {
  display: grid;
  gap: 18px;
  overflow: hidden;
}

.timetable-learning-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.timetable-learning-head > div:first-child {
  display: grid;
  gap: 4px;
}

.timetable-learning-head h2,
.timetable-learning-head p {
  margin: 0;
}

.timetable-learning-head h2 {
  color: var(--admin-ink);
  font-size: 22px;
}

.timetable-learning-head p {
  max-width: 680px;
  color: var(--admin-muted);
  font-size: 13px;
  line-height: 1.65;
}

.timetable-learning-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.timetable-learning-actions button {
  min-height: 36px;
  padding: 7px 12px;
}

.timetable-learning-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.timetable-learning-bento {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 14px;
}

.timetable-learning-section,
.timetable-learning-tasks {
  min-width: 0;
  border: 1px solid var(--admin-line);
  border-radius: 14px;
  background: #ffffff;
  padding: 16px;
}

.timetable-learning-section .panel-head,
.timetable-learning-tasks .panel-head {
  margin-bottom: 12px;
}

.timetable-learning-focus {
  background: linear-gradient(150deg, #ffffff, #f4f3ff);
}

.timetable-learning-tasks {
  overflow: auto;
}

.timetable-learning-tasks table {
  min-width: 880px;
}

.timetable-settings-panel > summary {
  cursor: pointer;
  color: var(--ds-text-secondary);
  font-weight: 700;
}

.timetable-settings-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.7fr) minmax(130px, 0.4fr) auto;
  align-items: end;
  gap: 12px;
  margin-top: 16px;
}

.timetable-settings-form label,
.course-modal-body label {
  display: grid;
  gap: 6px;
  color: var(--ds-text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.course-modal-panel {
  width: min(760px, 100%);
}

.course-modal-body {
  display: grid;
  gap: 14px;
}

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

.course-period-row {
  grid-template-columns: 1fr;
}

.course-period-row select {
  font-weight: 700;
}

.date-select-group {
  display: grid;
  grid-template-columns: minmax(96px, 1.25fr) minmax(66px, 1fr) minmax(66px, 1fr);
  gap: 7px;
  width: 100%;
}

.date-select-group.month-only {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.date-select-group select {
  min-width: 0;
}

.date-value-input {
  display: none !important;
}

.training-template-tools {
  display: grid;
  justify-content: flex-end;
  justify-items: end;
  gap: 6px;
}

.training-template-action-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.training-template-action-row .button-link,
.training-template-action-row button {
  display: inline-flex;
  min-height: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  padding: 0 11px;
}

.training-template-action-row .compact-upload {
  margin: 0;
}

.training-template-tools .save-status {
  justify-self: end;
  min-height: 18px;
  line-height: 18px;
}

.inventory-csv-modal-panel {
  width: min(520px, calc(100vw - 32px));
}

.inventory-csv-modal-body,
.inventory-csv-actions {
  display: grid;
  gap: 12px;
}

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

.inventory-csv-actions .upload-label,
.inventory-csv-actions button {
  width: 100%;
  min-height: 44px;
  justify-content: center;
}

.action-dialog-modal {
  z-index: 70;
}

.action-dialog-panel {
  width: min(470px, calc(100vw - 32px));
}

.action-dialog-body {
  display: grid;
  gap: 16px;
}

.action-dialog-message {
  margin: 0;
  color: var(--admin-ink);
  line-height: 1.7;
  white-space: pre-line;
}

.action-dialog-body label {
  display: grid;
  gap: 7px;
  color: var(--admin-ink);
  font-weight: 700;
}

.action-dialog-panel .modal-actions .danger {
  border-color: #fda29b;
  background: var(--ds-danger);
  color: #ffffff;
}

.training-template-status {
  margin: -6px 0 14px;
  color: var(--admin-muted);
  font-size: 12px;
}

.training-dynamic-fields {
  display: grid;
  gap: 2px;
}

.quiz-import-modal-panel {
  width: min(960px, 100%);
}

.practice-text-action {
  min-height: auto;
  width: fit-content;
  border: 0;
  background: transparent;
  color: var(--admin-primary);
  padding: 3px 0;
}

.course-form-main-row {
  grid-template-columns: minmax(0, 1.4fr) minmax(150px, 0.6fr);
}

.course-week-rule-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.course-modal-action-spacer {
  flex: 1;
}

.timetable-mobile-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 16px;
}

.timetable-mobile-days button {
  display: grid;
  min-width: 0;
  gap: 1px;
  min-height: 58px;
  padding: 6px 2px;
  color: var(--ds-text-muted);
}

.timetable-mobile-days button span {
  font-size: 11px;
}

.timetable-mobile-days button strong {
  font-size: 14px;
}

.timetable-mobile-days button.is-today {
  border-color: #8098f9;
}

.timetable-mobile-days button.active {
  border-color: var(--admin-primary);
  background: var(--admin-primary);
  color: #ffffff;
}

.timetable-mobile-date-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.timetable-mobile-date-head span {
  color: var(--admin-muted);
  font-size: 12px;
}

.timetable-mobile-timeline {
  position: relative;
}

.timetable-mobile-timeline.has-courses::before {
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 66px;
  width: 1px;
  background: var(--admin-line);
  content: "";
}

.timetable-timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 48px 12px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  width: 100%;
  min-height: 78px;
  border: 0;
  border-bottom: 1px solid var(--admin-line);
  border-radius: 0;
  background: transparent;
  padding: 13px 0;
  text-align: left;
}

.timetable-timeline-item:hover {
  background: var(--ds-surface-subtle);
}

.timetable-timeline-item time {
  color: var(--ds-text-muted);
  font-size: 12px;
}

.timetable-timeline-dot {
  z-index: 1;
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: var(--timetable-course-color);
  box-shadow: 0 0 0 2px var(--timetable-course-color);
}

.timetable-timeline-content {
  display: grid;
  gap: 3px;
  min-width: 0;
  color: var(--admin-ink);
}

.timetable-mobile-course-head {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.timetable-mobile-course-head a,
.timetable-mobile-course-head strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--admin-ink);
  font-weight: 700;
}

.timetable-mobile-course-head a:hover {
  color: var(--admin-primary);
}

.timetable-mobile-course-head button {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 0 9px;
  font-size: 11px;
}

.timetable-timeline-content strong,
.timetable-timeline-content small {
  overflow-wrap: anywhere;
}

.timetable-timeline-content small {
  color: var(--ds-text-muted);
  font-size: 11px;
}

.timetable-mobile-empty {
  min-height: 220px;
}

.modal {
  z-index: 100;
  padding: 24px;
}

.modal-backdrop {
  background: rgba(16, 24, 40, 0.48);
  backdrop-filter: blur(3px);
}

.modal-panel {
  border: 1px solid var(--admin-line);
  border-radius: 16px;
  background: var(--admin-surface);
  box-shadow: 0 24px 48px rgba(16, 24, 40, 0.2);
}

.modal-head,
.modal-actions {
  border-color: var(--admin-line);
}

.modal-head h2 {
  color: var(--ds-text);
}

.admin-token-modal {
  width: min(480px, 100%);
}

.form-error {
  margin: 8px 0 0;
  color: var(--admin-danger);
  font-size: 13px;
}

#toast {
  right: 24px;
  bottom: 24px;
  border-radius: 10px;
  background: var(--ds-text);
  box-shadow: 0 16px 32px rgba(16, 24, 40, 0.2);
}

.workspace-heading {
  display: grid;
  gap: 3px;
}

.workspace-heading-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.workspace-motivation {
  margin: 0;
  color: var(--ds-text-muted);
  font-size: 12px;
  line-height: 1.35;
}

.inventory-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
}

.inventory-toolbar .search-input,
.inventory-toolbar > button {
  min-height: 44px;
  height: 44px;
  margin: 0;
}

.inventory-toolbar > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-top: 0;
  padding-bottom: 0;
}

.module-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: min(620px, 100%);
  margin: 0 auto 20px;
  border: 1px solid var(--admin-line);
  border-radius: 14px;
  background: #f8f9fc;
  padding: 6px;
}

.module-switch button {
  display: grid;
  min-height: 62px;
  align-content: center;
  gap: 3px;
  border-color: transparent;
  background: transparent;
  color: var(--ds-text-muted);
  box-shadow: none;
  text-align: left;
}

.module-switch button span {
  color: var(--ds-text-secondary);
  font-size: 14px;
  font-weight: 800;
}

.module-switch button small {
  font-size: 11px;
  font-weight: 500;
}

.module-switch button.active {
  border-color: #d8dcff;
  background: #ffffff;
  color: var(--admin-primary);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.1);
}

.module-switch button.active span {
  color: var(--admin-primary-dark);
}

.timetable-mode-view[hidden] {
  display: none !important;
}

.timetable-learning-hub {
  margin-top: 0;
}

@media (max-width: 1180px) {
  .home-overview {
    grid-template-columns: 1fr;
  }

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

  .inventory-side {
    position: static;
  }

  .inventory-category-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

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

  .timetable-toolbar {
    grid-template-columns: 1fr minmax(190px, 240px);
  }

  .timetable-term-meta {
    grid-column: 1 / -1;
    justify-items: start;
    text-align: left;
  }

  .timetable-settings-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .timetable-settings-form button {
    grid-column: 1 / -1;
  }

  .timetable-learning-bento {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  .app-nav {
    width: min(292px, calc(100vw - 48px));
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    box-shadow: 16px 0 36px rgba(16, 24, 40, 0.16);
  }

  body.nav-open .app-nav {
    transform: translateX(0);
  }

  .app-main {
    width: 100%;
    margin-left: 0;
  }

  .mobile-nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .workspace-topbar {
    padding: 10px 22px;
  }

  .page,
  #page-home {
    padding-right: 22px;
    padding-left: 22px;
  }

  .nav-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    overflow: visible;
  }

  .nav-btn {
    width: 100%;
  }
}

@media (max-width: 680px) {
  .workspace-topbar {
    min-height: 64px;
    padding: 10px 14px;
  }

  .workspace-heading span,
  .workspace-tools > span:first-child {
    display: none;
  }

  .workspace-heading strong {
    font-size: 16px;
  }

  .workspace-heading-title > span,
  .workspace-motivation {
    display: none;
  }

  .module-switch {
    gap: 5px;
    padding: 5px;
  }

  .module-switch button {
    min-height: 50px;
    padding: 8px 10px;
    text-align: center;
  }

  .module-switch button small {
    display: none;
  }

  .page,
  #page-home {
    padding: 20px 14px 36px;
  }

  .page-heading,
  .page-heading-centered {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    text-align: center;
  }

  .page-actions {
    grid-column: auto;
    grid-row: auto;
    width: 100%;
    margin-left: 0;
  }

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

  .resource-folder-panel {
    position: static;
  }

  .date-select-group {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr);
  }

  .date-select-group.month-only {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .training-template-tools {
    width: 100%;
    justify-content: stretch;
    justify-items: stretch;
  }

  .training-template-action-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .training-template-action-row .button-link,
  .training-template-action-row button {
    width: 100%;
    justify-content: center;
  }

  .inventory-csv-actions {
    grid-template-columns: 1fr;
  }

  .page-actions button,
  .page-actions .button-link {
    width: 100%;
  }

  .panel,
  .home-overview > .panel,
  .home-profile-panel {
    padding: 16px;
  }

  .metric-grid,
  .home-profile-panel .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric {
    min-height: 94px;
    padding: 13px;
  }

  .table-toolbar,
  .inventory-toolbar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .table-toolbar > *,
  .inventory-toolbar > * {
    width: 100%;
  }

  .resource-toolbar,
  .resource-form-row,
  .resource-form-row:first-child,
  .resource-problem-fields {
    grid-template-columns: 1fr;
  }

  .resource-file-row,
  .resource-attachment-meta {
    align-items: stretch;
    flex-direction: column;
  }

  .resource-file-row button,
  .resource-attachment-meta button {
    width: 100%;
  }

  .timetable-week-view {
    display: none;
  }

  .timetable-mobile-view {
    display: block;
  }

  .timetable-toolbar,
  .timetable-settings-form,
  .course-form-row,
  .course-form-main-row,
  .course-week-rule-row {
    grid-template-columns: 1fr;
  }

  .timetable-learning-head {
    align-items: stretch;
    flex-direction: column;
  }

  .timetable-learning-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .timetable-learning-actions button {
    width: 100%;
  }

  .timetable-week-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .timetable-week-actions button {
    padding: 0 5px;
  }

  .timetable-settings-form button {
    grid-column: auto;
  }

  .course-modal-actions {
    flex-wrap: wrap;
  }

  .course-modal-action-spacer {
    display: none;
  }

  .course-modal-actions button {
    flex: 1;
  }

  .modal {
    align-items: flex-end;
    padding: 0;
  }

  .modal-panel {
    width: 100%;
    max-height: 90vh;
    border-radius: 16px 16px 0 0;
  }

  .inventory-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .inventory-pagination-actions button {
    flex: 1;
  }

  #toast {
    right: 14px;
    bottom: 14px;
    max-width: calc(100vw - 28px);
  }
}

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

#page-home .panel,
#page-home .home-profile-panel,
#page-home .carousel-shell,
#page-home .home-command-bar {
  border-radius: 16px;
}

@media (max-width: 768px) {
  #page-home .panel,
  #page-home .home-profile-panel,
  #page-home .carousel-shell,
  #page-home .home-command-bar {
    border-radius: 14px;
  }
}

/* Dashboard portal v4: profile banner + left context rail + daily workspace. */
#page-home .home-overview {
  display: block;
}

.home-profile-stage {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--ds-border, var(--ds-border));
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(43, 50, 79, .06);
}

#page-home .home-profile-stage .carousel-shell {
  width: 100%;
  height: clamp(230px, 22vw, 320px);
  min-height: 230px;
  max-height: 320px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

#page-home .home-profile-stage .carousel-caption {
  padding: 82px 28px 62px;
}

#page-home .home-profile-stage .carousel-caption span {
  display: inline-flex;
  width: max-content;
  min-height: 26px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 999px;
  background: rgba(20, 25, 43, .28);
  padding: 4px 10px;
  backdrop-filter: blur(8px);
}

#page-home .home-profile-stage .home-profile-panel {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(360px, 1.25fr) minmax(420px, .9fr);
  align-items: center;
  gap: 28px;
  min-height: 0;
  margin: -42px 28px 22px;
  border-color: rgba(223, 228, 255, .92);
  background: rgba(255, 255, 255, .97);
  padding: 20px 22px;
  box-shadow: 0 14px 36px rgba(31, 42, 91, .1);
  backdrop-filter: blur(14px);
}

#page-home .home-profile-identity {
  display: grid;
  grid-template-columns: 106px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
}

#page-home .profile-avatar-shell {
  width: 106px;
  height: 106px;
  border: 4px solid #ffffff;
  border-radius: 24px;
  box-shadow: 0 7px 20px rgba(52, 64, 84, .13);
}

#page-home .home-copy .eyebrow {
  margin: 0 0 5px;
}

#page-home .home-name-row {
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

#page-home .home-copy .home-name-row h2 {
  margin: 0;
  font-size: clamp(24px, 2.3vw, 32px);
  line-height: 1.15;
}

#page-home .home-copy .home-name-row > span {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  border-radius: 999px;
  background: var(--ds-brand-soft);
  color: var(--ds-brand);
  padding: 4px 9px;
  font-weight: 750;
}

#page-home .home-copy .hero-lead {
  max-width: 620px;
  margin: 7px 0 12px;
  color: var(--ds-text-muted);
  line-height: 1.55;
}

.home-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#page-home .home-profile-actions button {
  min-height: 36px;
}

#page-home .home-profile-panel .metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

#page-home .home-profile-panel .metric {
  min-height: 82px;
  align-content: center;
  border-color: #e8ebf2;
  background: #f8f9fc;
  padding: 10px;
  text-align: center;
}

#page-home .home-profile-panel .metric strong {
  font-size: 22px;
}

.carousel-manage {
  display: none;
}

body.workspace-manage-mode .carousel-manage {
  display: block;
}

.home-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(300px, 340px) minmax(0, 1fr);
  align-items: start;
  gap: 20px;
  margin-top: 20px;
}

.home-dashboard-sidebar,
.home-dashboard-main {
  display: grid;
  min-width: 0;
  gap: 20px;
}

#page-home .home-dashboard-sidebar .panel,
#page-home .home-dashboard-main .panel {
  min-width: 0;
  grid-column: auto;
  min-height: 0;
  order: initial;
}

#page-home .home-command-bar {
  min-height: 84px;
  grid-column: auto;
  order: initial;
  border-radius: 16px;
}

#page-home .home-calendar-panel,
#page-home .home-reminders-panel,
#page-home .home-annual-panel {
  min-height: 0;
  padding: 18px;
}

#page-home .home-calendar-panel {
  border-top: 3px solid #6675ff;
}

#page-home .home-reminders-panel {
  border-top: 3px solid var(--ds-warning);
}

#page-home .home-annual-panel {
  border-top: 3px solid var(--ds-brand);
}

#page-home .home-calendar-weekdays,
#page-home .home-mini-calendar {
  gap: 4px;
}

#page-home .home-calendar-weekdays {
  margin-top: 14px;
}

#page-home .home-mini-calendar > button {
  min-width: 0;
  min-height: 40px;
  border-radius: 9px;
}

#page-home .home-mini-calendar > button.partial small {
  color: var(--ds-warning);
  font-weight: 750;
}

#page-home .home-mini-calendar > button.all-done::after {
  right: 2px;
  bottom: 2px;
  left: auto;
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border: 1px solid var(--ds-success);
  border-radius: 50%;
  background: var(--ds-success-soft);
  color: var(--ds-success);
  content: "✓";
  font-size: 10px;
  font-weight: 900;
  transform: rotate(-10deg);
}

#page-home .home-calendar-legend {
  padding-top: 10px;
  border-top: 1px solid #f0f1f4;
}

#page-home .home-reminder-list {
  max-height: 315px;
  overflow: auto;
}

#page-home .home-reminder-item {
  min-height: 58px;
}

#page-home .home-annual-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}

#page-home .home-annual-metrics article {
  min-height: 105px;
  padding: 12px;
}

#page-home .home-execution-panel {
  min-height: 454px;
  grid-column: auto;
  grid-template-columns: minmax(0, 1.75fr) minmax(270px, .95fr);
  order: initial;
}

#page-home .home-execution-main {
  padding: 20px;
}

#page-home .home-execution-list {
  max-height: 224px;
}

#page-home .home-brief-panel {
  padding: 20px;
}

#page-home .home-brief-list {
  gap: 9px;
}

#page-home .home-brief-list article {
  min-height: 68px;
  padding: 11px 12px;
}

#page-home .home-status-panel {
  grid-column: auto;
  order: initial;
}

#page-home .home-status-panel .panel-head,
#page-home .home-highlights-panel .panel-head {
  margin-bottom: 14px;
}

#page-home .today-panel-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

#page-home .home-highlights-panel {
  display: block !important;
  grid-column: auto;
  order: initial;
}

#page-home .home-highlights-panel #openHighlightModalBtn {
  display: none;
}

body.workspace-manage-mode #page-home .home-highlights-panel #openHighlightModalBtn {
  display: inline-flex;
}

#page-home .home-highlights-panel .highlight-list {
  max-height: 286px;
}

@media (max-width: 1180px) {
  #page-home .home-profile-stage .home-profile-panel {
    grid-template-columns: 1fr;
  }

  #page-home .home-command-bar {
    align-items: center;
    flex-direction: row;
  }

  .home-dashboard-grid {
    grid-template-columns: 1fr;
  }

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

  #page-home .home-dashboard-sidebar .home-annual-panel {
    grid-column: 1 / -1;
  }

  #page-home .home-annual-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  #page-home .home-profile-stage .carousel-shell {
    height: 240px;
    min-height: 240px;
  }

  #page-home .home-profile-stage .home-profile-panel {
    margin-right: 18px;
    margin-left: 18px;
  }

  #page-home .home-execution-panel {
    grid-template-columns: 1fr;
  }

  #page-home .home-brief-panel {
    border-top: 1px solid var(--ds-border);
    border-left: 0;
  }

  #page-home .today-panel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .workspace-topbar :where(button, [role="button"]),
  .page :where(button, .button-link, summary, [role="button"]),
  .modal :where(button, .button-link) {
    min-height: 40px !important;
  }

  .workspace-topbar :where(.ui-icon-button, .mobile-nav-toggle),
  .page :where(.ui-icon-button, .icon-btn, button.ghost-btn),
  .modal :where(.ui-icon-button, .icon-btn, button.ghost-btn) {
    min-width: 40px;
  }

  .page :where(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea),
  .modal :where(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea) {
    min-height: 42px;
  }

}

@media (max-width: 768px) {
  #page-home .home-profile-stage {
    border-radius: 14px;
  }

  #page-home .home-profile-stage .carousel-caption {
    padding: 68px 18px 52px;
  }

  #page-home .home-profile-stage .home-profile-panel {
    margin: -30px 14px 14px;
    padding: 16px;
  }

  #page-home .home-profile-identity {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 14px;
  }

  #page-home .profile-avatar-shell {
    width: 88px;
    height: 88px;
    border-radius: 20px;
  }

  #page-home .home-profile-panel .metric-grid,
  #page-home .home-annual-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-dashboard-sidebar {
    grid-template-columns: 1fr;
  }

  #page-home .home-dashboard-sidebar .home-annual-panel {
    grid-column: auto;
  }

  #page-home .home-command-bar {
    align-items: stretch;
    flex-direction: column;
  }

  #page-home .home-command-actions {
    justify-content: flex-start;
  }

  #page-home .home-execution-date-tools {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  #page-home .home-profile-stage .carousel-shell {
    height: 190px;
    min-height: 190px;
  }

  #page-home .home-profile-stage .carousel-caption strong {
    font-size: 16px;
  }

  #page-home .home-profile-stage .carousel-caption small {
    display: none;
  }

  #page-home .home-profile-stage .home-profile-panel {
    margin-top: -24px;
  }

  #page-home .home-profile-identity {
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: start;
  }

  #page-home .profile-avatar-shell {
    width: 72px;
    height: 72px;
    border-radius: 18px;
  }

  #page-home .home-copy .home-name-row h2 {
    font-size: 22px;
  }

  #page-home .home-profile-actions,
  #page-home .home-command-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  #page-home .home-command-actions .primary {
    grid-column: 1 / -1;
  }

  #page-home .home-section-heading,
  #page-home .home-calendar-head {
    gap: 10px;
  }

  #page-home .home-execution-date-tools .daily-todo-date {
    order: -1;
    width: 100%;
  }

  #page-home .home-progress-summary {
    grid-template-columns: 62px minmax(0, 1fr);
  }

  #page-home .home-progress-ring {
    width: 58px;
    height: 58px;
  }

  #page-home .today-panel-grid {
    grid-template-columns: 1fr;
  }
}

/* Sidebar v13: compact workspace navigation with a tablet icon rail. */
.app-nav {
  width: var(--ds-sidebar-width);
  gap: 12px;
  overflow: visible;
}

.nav-list {
  min-height: 0;
  flex: 1 1 auto;
  align-content: start;
  gap: 12px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 2px 4px 0;
  scrollbar-color: #d8deea transparent;
  scrollbar-width: thin;
}

.nav-list::-webkit-scrollbar {
  width: 5px;
}

.nav-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #d8deea;
}

.workspace-chip[data-sync-tone="local"] .status-dot {
  background: #7a8699;
  box-shadow: 0 0 0 4px rgba(122, 134, 153, 0.12);
}

.workspace-chip[data-sync-tone="saving"] .status-dot {
  background: var(--ds-brand);
  box-shadow: 0 0 0 4px rgba(91, 92, 226, 0.12);
  animation: sidebar-sync-pulse 1.2s ease-in-out infinite;
}

.workspace-chip[data-sync-tone="synced"] .status-dot {
  background: var(--ds-success);
  box-shadow: 0 0 0 4px rgba(39, 155, 104, 0.12);
}

.workspace-chip[data-sync-tone="error"] .status-dot {
  background: var(--ds-danger);
  box-shadow: 0 0 0 4px rgba(196, 50, 43, 0.12);
}

@keyframes sidebar-sync-pulse {
  50% { opacity: 0.45; }
}

.nav-section-label:focus-visible {
  outline: 3px solid rgba(91, 92, 226, 0.18);
  outline-offset: 2px;
}

.nav-btn {
  position: relative;
  overflow: visible;
  padding-right: 10px;
  padding-left: 10px;
  text-align: left;
}

.nav-btn::before {
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: -1px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--ds-brand);
  content: "";
  opacity: 0;
  transition: opacity 150ms ease;
}

.nav-btn.active::before {
  opacity: 1;
}

.nav-badge:not(.hidden) {
  display: grid;
  min-width: 20px;
  height: 20px;
  margin-left: auto;
  place-items: center;
  border-radius: 999px;
  background: #e9eaff;
  color: var(--ds-brand-strong);
  padding: 0 6px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.nav-workspace-menu {
  position: relative;
  flex: 0 0 auto;
}

.nav-workspace-trigger {
  display: grid;
  width: 100%;
  min-height: 52px;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border-color: var(--ds-border);
  border-radius: 12px;
  background: var(--ds-surface-subtle);
  padding: 7px 9px;
  color: var(--ds-text-secondary);
  text-align: left;
}

.nav-workspace-trigger:hover,
.nav-workspace-trigger[aria-expanded="true"] {
  border-color: #dfe2ff;
  background: var(--ds-brand-soft);
  color: var(--ds-brand-strong);
}

.nav-user-avatar {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 11px;
  background: var(--ds-brand-soft-strong);
  color: var(--ds-brand-strong);
  font-size: 12px;
  font-weight: 800;
}

.nav-workspace-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.nav-workspace-copy strong,
.nav-workspace-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-workspace-copy strong {
  color: var(--ds-text);
  font-size: 13px;
}

.nav-workspace-copy small {
  color: var(--ds-text-muted);
  font-size: 12px;
}

.nav-workspace-more {
  color: var(--ds-text-muted);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.nav-workspace-popover {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 120;
  display: grid;
  width: 260px;
  gap: 4px;
  border: 1px solid var(--ds-border);
  border-radius: 14px;
  background: var(--ds-surface);
  padding: 7px;
  box-shadow: 0 18px 42px rgba(16, 24, 40, 0.18);
}

.nav-workspace-popover > button {
  display: grid;
  width: 100%;
  min-height: 50px;
  height: auto;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  border-color: transparent;
  padding: 7px 9px;
  color: var(--ds-text-secondary);
  text-align: left;
}

.nav-workspace-popover > button:hover,
.nav-workspace-popover > button:focus-visible {
  border-color: #edf0f6;
  background: var(--ds-surface-subtle);
}

.nav-workspace-popover > button > span:first-child {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: var(--ds-brand-soft);
  color: var(--ds-brand-strong);
}

.nav-workspace-popover > button > span:last-child {
  display: grid;
  gap: 1px;
}

.nav-workspace-popover strong {
  color: var(--ds-text);
  font-size: 13px;
}

.nav-workspace-popover small {
  color: var(--ds-text-muted);
  font-size: 12px;
}

.nav-workspace-popover .nav-workspace-exit {
  border-top: 1px solid var(--ds-border);
  border-radius: 0 0 9px 9px;
  margin-top: 3px;
  color: var(--ds-danger);
}

.nav-workspace-popover .nav-workspace-exit > span:first-child {
  background: var(--ds-danger-soft);
  color: var(--ds-danger);
}

body.nav-collapsed .app-nav {
  width: var(--ds-sidebar-collapsed);
  padding-right: 10px;
  padding-left: 10px;
}

body.nav-collapsed .app-main {
  margin-left: var(--ds-sidebar-collapsed);
}

body.nav-collapsed .brand {
  grid-template-columns: 1fr;
  justify-items: center;
}

body.nav-collapsed .brand > div:not(.brand-mark),
body.nav-collapsed .workspace-chip > span:last-child,
body.nav-collapsed .global-jump input,
body.nav-collapsed .nav-section-label,
body.nav-collapsed .nav-btn > span:not(.nav-icon):not(.nav-badge),
body.nav-collapsed .nav-workspace-copy,
body.nav-collapsed .nav-workspace-more {
  display: none;
}

body.nav-collapsed .workspace-chip,
body.nav-collapsed .global-jump,
body.nav-collapsed .nav-btn,
body.nav-collapsed .nav-workspace-trigger {
  width: 44px;
  min-height: 44px;
  justify-content: center;
  padding: 0;
}

body.nav-collapsed .global-jump {
  grid-template-columns: 1fr;
}

body.nav-collapsed .nav-list {
  gap: 5px;
  overflow-x: hidden;
}

body.nav-collapsed .nav-section {
  gap: 4px;
}

body.nav-collapsed .nav-section.collapsed .nav-btn {
  display: flex;
}

body.nav-collapsed .nav-badge:not(.hidden) {
  position: absolute;
  top: 2px;
  right: 1px;
  display: grid !important;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  font-size: 10px;
}

body.nav-collapsed .nav-workspace-menu {
  width: 44px;
}

body.nav-collapsed .nav-workspace-popover {
  right: auto;
  bottom: 0;
  left: calc(100% + 10px);
}

@media (min-width: 769px) and (max-width: 1024px) {
  .app-nav {
    width: var(--ds-sidebar-width);
    padding: 18px 12px 16px;
    transform: none;
    box-shadow: none;
  }

  .app-main {
    width: auto;
    margin-left: var(--ds-sidebar-width);
  }

  body.nav-collapsed .app-nav {
    width: var(--ds-sidebar-collapsed);
    padding-right: 10px;
    padding-left: 10px;
    transform: none;
    box-shadow: none;
  }

  body.nav-collapsed .app-main {
    width: auto;
    margin-left: var(--ds-sidebar-collapsed);
  }

  .nav-collapse-button,
  body.nav-collapsed .nav-collapse-button {
    display: grid;
  }

  .mobile-nav-toggle {
    display: none;
  }

  .nav-backdrop {
    display: none;
  }
}

@media (max-width: 768px) {
  .app-nav,
  body.nav-collapsed .app-nav {
    width: min(320px, calc(100vw - 32px));
    gap: 12px;
    padding: 18px 14px 16px;
    transform: translateX(-105%);
    box-shadow: 18px 0 44px rgba(16, 24, 40, 0.17);
  }

  body.nav-open .app-nav,
  body.nav-collapsed.nav-open .app-nav {
    transform: translateX(0);
  }

  .app-main,
  body.nav-collapsed .app-main {
    width: 100%;
    margin-left: 0;
  }

  .mobile-nav-toggle {
    display: inline-grid;
  }

  .nav-collapse-button,
  body.nav-collapsed .nav-collapse-button {
    display: none;
  }

  body.nav-collapsed .brand {
    grid-template-columns: 40px minmax(0, 1fr);
    justify-items: stretch;
  }

  body.nav-collapsed .brand > div:not(.brand-mark),
  body.nav-collapsed .workspace-chip > span:last-child,
  body.nav-collapsed .global-jump input,
  body.nav-collapsed .nav-section-label,
  body.nav-collapsed .nav-btn > span:not(.nav-icon),
  body.nav-collapsed .nav-workspace-more {
    display: initial;
  }

  body.nav-collapsed .brand > div:not(.brand-mark),
  body.nav-collapsed .nav-workspace-copy {
    display: grid;
  }

  body.nav-collapsed .workspace-chip,
  body.nav-collapsed .global-jump,
  body.nav-collapsed .nav-btn,
  body.nav-collapsed .nav-workspace-trigger,
  body.nav-collapsed .nav-workspace-menu {
    width: 100%;
    justify-content: flex-start;
  }

  body.nav-collapsed .workspace-chip,
  body.nav-collapsed .global-jump,
  body.nav-collapsed .nav-btn {
    padding-right: 9px;
    padding-left: 9px;
  }

  body.nav-collapsed .nav-workspace-trigger {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    padding: 7px 9px;
  }

  body.nav-collapsed .global-jump {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  body.nav-collapsed .nav-section.collapsed .nav-btn {
    display: none;
  }

  body.nav-collapsed .nav-badge:not(.hidden) {
    position: static;
    display: grid !important;
    min-width: 20px;
    height: 20px;
    margin-left: auto;
    padding: 0 6px;
    font-size: 11px;
  }

  .nav-workspace-popover,
  body.nav-collapsed .nav-workspace-popover {
    right: 0;
    bottom: calc(100% + 8px);
    left: 0;
    width: 100%;
  }
}

/* Page boundary guardrail: legacy module rules must not reveal inactive pages. */
.app-main > .page:not(.active) {
  display: none !important;
}

.app-main > .page.active {
  display: block;
}

.metric-grid:has(> :nth-child(4):last-child) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* 2026 module-specific workspace refresh */
.module-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.module-section-heading > div {
  display: grid;
  gap: 3px;
}

.module-section-heading h3 {
  margin: 0;
  color: var(--admin-ink);
  font-size: 18px;
}

.module-section-heading > span {
  color: var(--admin-muted);
  font-size: 12px;
}

.module-section-kicker {
  color: var(--admin-primary);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

/* Resource library: file manager */
#page-resources .resource-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.resource-recent-section {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.resource-quick-access {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.resource-quick-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 86px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--admin-line);
  border-radius: 14px;
  background: #ffffff;
  padding: 14px;
  text-align: left;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.04);
}

.resource-quick-card:hover {
  border-color: #c7cffc;
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.1);
  transform: translateY(-1px);
}

.resource-file-icon,
.resource-card-file-icon {
  display: grid;
  width: 46px;
  height: 52px;
  place-items: end center;
  border-radius: 8px 8px 11px 11px;
  background: linear-gradient(150deg, #e9edff, #dce3ff);
  color: #4653c5;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding-bottom: 9px;
}

.resource-quick-installer .resource-file-icon,
.resource-kind-installer .resource-card-file-icon { background: linear-gradient(150deg, #f1eaff, #e7dcff); color: #6941c6; }
.resource-quick-material .resource-file-icon,
.resource-kind-material .resource-card-file-icon { background: linear-gradient(150deg, #e7f8ef, #d8f3e5); color: var(--ds-success); }
.resource-quick-problem .resource-file-icon,
.resource-kind-problem .resource-card-file-icon { background: linear-gradient(150deg, #fff3df, #ffe8bd); color: var(--ds-warning); }

.resource-quick-copy {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.resource-quick-copy strong,
.resource-quick-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-quick-copy strong { color: #1d2939; font-size: 13px; }
.resource-quick-copy small { color: var(--admin-muted); font-size: 11px; font-weight: 500; }
.resource-quick-arrow { color: var(--ds-text-faint); font-size: 15px; }
.resource-quick-empty { grid-column: 1 / -1; border: 1px dashed var(--admin-line-strong); border-radius: 14px; color: var(--admin-muted); padding: 22px; text-align: center; }

.resource-library-layout {
  grid-template-columns: 230px minmax(0, 1fr);
  margin-top: 22px;
}

.resource-view-label {
  border: 1px solid var(--admin-line);
  border-radius: 999px;
  background: #f8f9fc;
  color: var(--ds-text-muted);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
}

.resource-grid {
  grid-template-columns: 1fr;
  gap: 10px;
}

.resource-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: start;
  gap: 7px 14px;
  border-radius: 12px;
  padding: 15px 16px;
  box-shadow: none;
}

.resource-card::before {
  inset: 0 0 auto 0;
  width: auto;
  height: 3px;
}

.resource-card-file-icon { grid-column: 1; grid-row: 1 / span 4; }
.resource-card-head { grid-column: 3; grid-row: 1; justify-content: flex-end; }
.resource-card h3 { grid-column: 2; grid-row: 1; align-self: center; font-size: 15px; }
.resource-meta-row { grid-column: 2 / 4; grid-row: 2; }
.resource-summary { grid-column: 2 / 4; grid-row: 3; margin: 0; color: var(--ds-text-muted); font-size: 12px; }
.resource-details,
.resource-tags,
.resource-file-row { grid-column: 2 / 4; }
.resource-card-actions { grid-column: 2; flex-wrap: wrap; margin-top: 4px; }
.resource-updated { grid-column: 3; align-self: end; justify-self: end; color: var(--ds-text-faint); font-size: 11px; }
.resource-kind-badge,
.resource-status { min-height: 22px; font-size: 10px; padding: 3px 7px; }

/* Learning planner: progress + priorities + daily schedule */
.timetable-learning-panel { gap: 20px; padding: 22px; }

.learning-plan-overview {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  border: 1px solid #e0e4ff;
  border-radius: 16px;
  background: linear-gradient(120deg, #f7f8ff, #ffffff 58%, #f3f0ff);
  padding: 20px 22px;
}

.learning-plan-progress-ring,
.practice-score-ring,
.review-progress-ring {
  display: grid;
  width: 104px;
  height: 104px;
  place-content: center;
  border-radius: 50%;
  background: radial-gradient(circle at center, #ffffff 0 61%, transparent 62%), conic-gradient(var(--admin-primary) calc(var(--learning-progress, 0) * 1%), #e5e7f7 0);
  text-align: center;
}

.learning-plan-progress-ring strong,
.practice-score-ring strong,
.review-progress-ring strong { color: #1d2939; font-size: 22px; }
.learning-plan-progress-ring span,
.practice-score-ring span,
.review-progress-ring span { color: var(--ds-text-muted); font-size: 10px; font-weight: 700; }

.learning-plan-goal h3 { margin: 4px 0 7px; color: var(--ds-text); font-size: 22px; }
.learning-plan-goal p { max-width: 650px; margin: 0; color: var(--ds-text-muted); font-size: 13px; line-height: 1.6; }
.learning-plan-overview-metrics { display: grid; grid-template-columns: repeat(3, auto); gap: 8px; }
.learning-plan-overview-metrics span { display: grid; gap: 2px; min-width: 86px; border-left: 1px solid #dfe3f3; color: var(--ds-text-muted); font-size: 10px; padding-left: 13px; }
.learning-plan-overview-metrics strong { color: var(--ds-text-secondary); font-size: 19px; }

.learning-plan-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(220px, 0.55fr);
  gap: 14px;
}

.learning-plan-card {
  min-width: 0;
  border: 1px solid var(--admin-line);
  border-radius: 14px;
  background: #ffffff;
  padding: 16px;
}

.learning-priority-list { display: grid; margin-top: 12px; }
.learning-priority-list article { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px; border-top: 1px solid #eef0f5; padding: 11px 0; }
.learning-priority-list article > span { color: var(--ds-text-faint); font-size: 11px; font-weight: 800; }
.learning-priority-list article div { display: grid; min-width: 0; gap: 3px; }
.learning-priority-list article strong { color: var(--ds-text-secondary); font-size: 12px; }
.learning-priority-list article small { overflow: hidden; color: var(--ds-text-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.learning-priority-list article b { border-radius: 999px; background: #fff4e5; color: var(--ds-warning); font-size: 9px; padding: 4px 7px; }
.learning-plan-schedule .annual-course-list { margin-top: 12px; }
.learning-plan-pulse { background: linear-gradient(150deg, #29265f, #4942a0); color: #ffffff; }
.learning-plan-pulse .module-section-kicker { color: #c9c6ff; }
.learning-plan-pulse h3 { margin: 6px 0 12px; font-size: 18px; }
.learning-plan-pulse p { min-height: 70px; color: #dedcff; font-size: 11px; line-height: 1.65; }
.learning-pulse-bar { height: 7px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.18); }
.learning-pulse-bar span { display: block; height: 100%; border-radius: inherit; background: #a9a5ff; }
.learning-plan-pulse > div:not(.learning-pulse-bar) { display: flex; justify-content: space-between; border-top: 1px solid rgba(255,255,255,.14); padding: 9px 0; font-size: 11px; }

/* Practice center: quiz dashboard + recent attempts */
.practice-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(380px, .65fr);
  gap: 14px;
  margin-bottom: 18px;
}

.practice-focus-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  border: 1px solid #dce1ff;
  border-radius: 16px;
  background: linear-gradient(125deg, #f1f3ff, #ffffff 62%, #f8efff);
  padding: 20px 22px;
}

.practice-focus-card h3 { margin: 5px 0 6px; color: var(--ds-text); font-size: 21px; }
.practice-focus-card p { margin: 0 0 14px; color: var(--ds-text-muted); font-size: 12px; }
.practice-focus-card button { min-height: 36px; }
.practice-score-ring { width: 94px; height: 94px; background: radial-gradient(circle at center, #ffffff 0 61%, transparent 62%), conic-gradient(var(--ds-brand) calc(var(--practice-progress, 0) * 1%), #e7e7f5 0); }

.practice-dashboard-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.practice-dashboard-metrics > div,
.training-summary-metrics > div { display: grid; min-width: 0; gap: 4px; border: 1px solid var(--admin-line); border-radius: 13px; background: #ffffff; padding: 14px; }
.practice-dashboard-metrics span,
.training-summary-metrics span { color: var(--ds-text-muted); font-size: 11px; }
.practice-dashboard-metrics strong,
.training-summary-metrics strong { color: var(--ds-text); font-size: 22px; }
.practice-dashboard-metrics small,
.training-summary-metrics small { color: var(--ds-text-faint); font-size: 10px; }

#page-learning .control-grid { grid-template-columns: minmax(0, 1fr) 370px; }
.practice-library-panel { min-width: 0; }
.practice-library-panel .summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.practice-recent-head { display: flex; justify-content: space-between; margin: 18px 0 8px; color: var(--ds-text-secondary); font-size: 12px; }
.practice-recent-head span { color: var(--ds-text-faint); font-size: 10px; }
.practice-recent-list { display: grid; gap: 6px; }
.practice-recent-item { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 9px; width: 100%; min-height: 52px; border-color: transparent; background: #f8f9fc; padding: 7px 9px; text-align: left; }
.practice-recent-item:hover,
.practice-recent-item.active { border-color: #d7dcff; background: #f1f3ff; }
.practice-recent-date { display: grid; place-items: center; align-self: stretch; border-radius: 8px; background: #ffffff; color: var(--ds-text-muted); font-size: 10px; font-weight: 800; }
.practice-recent-item > span:nth-child(2) { display: grid; min-width: 0; gap: 3px; }
.practice-recent-item strong,
.practice-recent-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.practice-recent-item strong { color: var(--ds-text-secondary); font-size: 11px; }
.practice-recent-item small { color: var(--ds-text-faint); font-size: 9px; }
.practice-recent-item b { border-radius: 999px; background: var(--ds-success-soft); color: var(--ds-success); font-size: 9px; padding: 4px 7px; }
.practice-recent-item b.pending { background: var(--ds-surface-muted); color: var(--ds-text-muted); }
.exam-side { position: sticky; top: 88px; }

/* Training log: summary + form/history */
.training-stats { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(420px, .75fr); gap: 14px; margin-bottom: 18px; }
.training-summary-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; border: 1px solid #d9e9e5; border-radius: 16px; background: linear-gradient(125deg, #effaf6, #ffffff 65%); padding: 20px 22px; }
.training-summary-hero h3 { margin: 5px 0 6px; color: var(--ds-text); font-size: 20px; }
.training-summary-hero p { max-width: 650px; margin: 0; color: var(--ds-text-muted); font-size: 12px; line-height: 1.6; }
.training-streak { display: grid; min-width: 108px; gap: 2px; border-left: 1px solid #d5e7e1; padding-left: 20px; text-align: center; }
.training-streak strong { color: #08795e; font-size: 34px; }
.training-streak span { color: var(--ds-text-muted); font-size: 10px; }
.training-summary-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.training-layout { grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; }
.training-library { position: sticky; top: 88px; }
.training-library .log-list { position: relative; display: grid; gap: 0; padding-left: 14px; }
.training-library .log-list::before { position: absolute; top: 8px; bottom: 8px; left: 5px; width: 1px; background: #dfe3ea; content: ""; }
.training-library .log-item { position: relative; display: grid; gap: 4px; border: 0; border-bottom: 1px solid #eef0f4; border-radius: 0; background: transparent; padding: 12px 8px 12px 16px; }
.training-library .log-item::before { position: absolute; top: 18px; left: -13px; width: 9px; height: 9px; border: 2px solid #ffffff; border-radius: 50%; background: var(--ds-text-faint); box-shadow: 0 0 0 1px var(--ds-border-strong); content: ""; }
.training-library .log-item.active { background: var(--ds-brand-soft); }
.training-library .log-item.active::before { background: var(--admin-primary); box-shadow: 0 0 0 2px #dfe3ff; }
.training-library .log-item strong { color: var(--ds-text-secondary); font-size: 12px; }
.training-library .log-item span { color: var(--ds-text-muted); font-size: 10px; }

/* Review center: cycle status + queue */
.review-dashboard { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr) 230px; gap: 14px; margin-bottom: 18px; }
.review-cycle-card,
.review-queue-card,
.review-score-card { border: 1px solid var(--admin-line); border-radius: 16px; background: #ffffff; padding: 18px; }
.review-cycle-card { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 18px; background: linear-gradient(125deg, #f7f5ff, #ffffff); }
.review-progress-ring { width: 96px; height: 96px; background: radial-gradient(circle at center, #ffffff 0 61%, transparent 62%), conic-gradient(var(--ds-brand) calc(var(--review-progress, 0) * 1%), #e9e7f3 0); }
.review-cycle-card h3 { margin: 5px 0 6px; color: var(--ds-text); font-size: 19px; }
.review-cycle-card p { margin: 0; color: var(--ds-text-muted); font-size: 11px; line-height: 1.6; }
.review-cycle-metrics { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; border-top: 1px solid #eceaf4; padding-top: 12px; }
.review-cycle-metrics span { display: flex; align-items: baseline; gap: 5px; color: var(--ds-text-muted); font-size: 10px; }
.review-cycle-metrics strong { color: var(--ds-text-secondary); font-size: 17px; }
.review-queue-card { min-width: 0; }
.review-queue-list { display: grid; margin-top: 10px; }
.review-queue-list > div { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 8px; border-top: 1px solid #eef0f4; padding: 8px 0; }
.review-queue-list > div > span { grid-row: 1 / span 2; align-self: center; border-radius: 6px; font-size: 9px; padding: 4px 6px; }
.review-queue-list .due { background: var(--ds-danger-soft); color: var(--ds-danger); }
.review-queue-list .upcoming { background: var(--ds-brand-soft); color: var(--ds-brand-strong); }
.review-queue-list strong,
.review-queue-list small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.review-queue-list strong { color: var(--ds-text-secondary); font-size: 10px; }
.review-queue-list small { color: var(--ds-text-faint); font-size: 9px; }
.review-score-card { display: grid; align-content: center; background: #29265f; color: #ffffff; text-align: center; }
.review-score-card .module-section-kicker { color: #c8c5ff; }
.review-score-card > strong { margin-top: 10px; font-size: 30px; }
.review-score-card p { margin: 2px 0 12px; color: #cfccff; font-size: 11px; }
.review-score-card div { border-top: 1px solid rgba(255,255,255,.14); color: #d8d6f7; font-size: 9px; padding-top: 10px; }
.review-generator-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.review-generator { position: relative; display: grid; gap: 10px; overflow: hidden; padding-top: 22px; }
.review-generator::before { position: absolute; inset: 0 0 auto; height: 4px; background: var(--admin-primary); content: ""; }
.review-generator-week::before { background: #1570ef; }
.review-generator-month::before { background: var(--ds-success); }
.review-generator-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 10px; background: #f0efff; color: #5d55c9; font-size: 11px; font-weight: 900; }
.review-generator-week .review-generator-icon { background: #eff8ff; color: var(--ds-info); }
.review-generator-month .review-generator-icon { background: var(--ds-success-soft); color: var(--ds-success); }
.review-generator .panel-head { margin: 0; }
.review-generator input { width: 100%; }
.review-workspace-panel { margin-top: 18px; }

/* Export & settings: segmented settings page */
.settings-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); align-items: start; gap: 18px; }
.settings-navigation { position: sticky; top: 88px; display: grid; gap: 6px; padding: 14px; }
.settings-nav-head { display: grid; gap: 3px; border-bottom: 1px solid var(--admin-line); margin-bottom: 4px; padding: 4px 6px 14px; }
.settings-nav-head span { color: var(--ds-text-faint); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.settings-nav-head strong { color: var(--ds-text); font-size: 16px; }
.settings-navigation button { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 8px; min-height: 43px; border-color: transparent; background: transparent; color: var(--ds-text-secondary); text-align: left; }
.settings-navigation button span { color: var(--ds-text-faint); font-size: 9px; }
.settings-navigation button.active { border-color: #dfe3ff; background: #f1f3ff; color: #4338ca; }
.settings-navigation button.danger { color: var(--ds-danger); }
.settings-content { display: grid; gap: 16px; min-width: 0; }
.settings-status-header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; }
.settings-status-icon { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 13px; background: var(--ds-success-soft); color: var(--ds-success); font-size: 18px; }
.settings-status-header h2 { margin: 3px 0; color: var(--ds-text); font-size: 20px; }
.settings-status-header p { margin: 0; color: var(--ds-text-muted); font-size: 11px; }
.settings-version { align-self: start; border-radius: 999px; background: var(--ds-surface-muted); color: var(--ds-text-muted); font-size: 9px; padding: 5px 8px; }
.settings-runtime-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.settings-runtime-grid > div { display: grid; min-width: 0; gap: 4px; border: 1px solid var(--admin-line); border-radius: 12px; background: var(--ds-surface-subtle); padding: 13px; }
.settings-runtime-grid span { color: var(--ds-text-muted); font-size: 10px; }
.settings-runtime-grid strong { overflow: hidden; color: var(--ds-text-secondary); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.settings-runtime-grid small { color: var(--ds-text-faint); font-size: 9px; }
.settings-runtime-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.settings-help { margin: 12px 0 0; color: var(--ds-text-muted); font-size: 11px; line-height: 1.6; }
.settings-section { position: relative; min-height: 180px; padding-left: 84px; scroll-margin-top: 90px; }
.settings-section-icon { position: absolute; top: 20px; left: 20px; display: grid; width: 44px; height: 44px; place-items: center; border-radius: 12px; background: var(--ds-brand-soft); color: #4338ca; font-size: 20px; }
.settings-section-icon-green { background: var(--ds-success-soft); color: var(--ds-success); }
.settings-section .panel-head { margin-bottom: 14px; }
.settings-section select { width: min(520px, 100%); }
.settings-section .button-row { margin-top: 12px; }
.settings-section .upload-label { width: min(520px, 100%); min-height: 46px; justify-content: center; }
.settings-danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-color: #fecdca; background: #fffbfa; scroll-margin-top: 90px; }
.settings-danger-zone span { color: var(--ds-danger); font-size: 10px; font-weight: 900; letter-spacing: .1em; }
.settings-danger-zone h2 { margin: 4px 0; color: #7a271a; font-size: 16px; }
.settings-danger-zone p { margin: 0; color: #912018; font-size: 11px; }
.settings-danger-zone button { flex: 0 0 auto; }

.ai-config-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ai-config-grid .wide-field { grid-column: 1 / -1; }
.ai-security-note { display: grid; gap: 4px; margin-top: 14px; border: 1px solid #abefc6; border-radius: 11px; background: var(--ds-success-soft); padding: 11px 13px; }
.ai-security-note strong { color: var(--ds-success); font-size: 11px; }
.ai-security-note span { color: #05603a; font-size: 10px; line-height: 1.55; }

@media (max-width: 1180px) {
  .resource-quick-access { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .learning-plan-overview { grid-template-columns: auto minmax(0, 1fr); }
  .learning-plan-overview-metrics { grid-column: 1 / -1; }
  .learning-plan-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .learning-plan-pulse { grid-column: 1 / -1; }
  .practice-dashboard,
  .training-stats { grid-template-columns: 1fr; }
  .review-dashboard { grid-template-columns: minmax(0, 1.3fr) minmax(300px, .7fr); }
  .review-score-card { grid-column: 1 / -1; min-height: 150px; }
}

@media (max-width: 900px) {
  #page-resources .resource-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .resource-library-layout,
  .settings-layout { grid-template-columns: 1fr; }
  .resource-folder-panel,
  .settings-navigation,
  .training-library,
  .exam-side { position: static; }
  .settings-navigation { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .settings-nav-head { grid-column: 1 / -1; }
  .settings-navigation button { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .settings-navigation button span { display: none; }
  .practice-dashboard { grid-template-columns: 1fr; }
  #page-learning .control-grid,
  .training-layout,
  .review-dashboard,
  .review-generator-grid { grid-template-columns: 1fr; }
  .review-score-card { grid-column: auto; }
  .learning-plan-columns { grid-template-columns: 1fr; }
  .learning-plan-pulse { grid-column: auto; }
}

@media (max-width: 680px) {
  .ai-config-grid { grid-template-columns: 1fr; }
  .resource-quick-access,
  .practice-dashboard-metrics,
  .training-summary-metrics { grid-template-columns: 1fr; }
  .resource-card { display: flex; }
  .resource-card-file-icon { align-self: flex-start; flex: 0 0 auto; }
  .resource-card-head { justify-content: flex-start; }
  .resource-updated { align-self: flex-start; }
  .learning-plan-overview { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .learning-plan-overview-metrics { grid-template-columns: 1fr; width: 100%; }
  .learning-plan-overview-metrics span { border-top: 1px solid var(--ds-border); border-left: 0; padding: 8px 0 0; }
  .practice-focus-card,
  .training-summary-hero,
  .review-cycle-card { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .training-streak { border-top: 1px solid #d5e7e1; border-left: 0; padding: 12px 0 0; }
  .review-cycle-metrics { grid-template-columns: 1fr; }
  .settings-navigation { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-runtime-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-section { padding: 72px 16px 16px; }
  .settings-danger-zone { align-items: stretch; flex-direction: column; }
  .settings-danger-zone button { width: 100%; }
}

/* Home workspace v2: profile card, stable carousel and structured daily lists. */
body.public-mode .profile-edit-button,
body.public-mode #openTodoModalBtn,
body.public-mode #clearCompletedTodosBtn,
body.public-mode #openHighlightModalBtn,
body.public-mode .delete-highlight-btn { display: none !important; }

.danger-text { border-color: #fecdca !important; color: var(--ds-danger) !important; }
.ai-profile-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; margin-bottom: 14px; }
.ai-profile-toolbar label { display: grid; min-width: 0; gap: 6px; color: var(--ds-text-secondary); font-size: 10px; font-weight: 800; }
.ai-profile-toolbar select { width: 100%; }
.ai-config-switches { display: flex; flex-wrap: wrap; gap: 18px; border: 1px solid var(--ds-border); border-radius: 10px; background: var(--ds-surface-subtle); padding: 10px 12px; }
.ai-config-switches .check-row { display: flex; align-items: center; gap: 7px; }
.ai-config-switches input { width: auto; }
@media (max-width: 680px) {
  .ai-profile-toolbar { grid-template-columns: 1fr; }
}

.home-profile-panel {
  min-height: 420px;
  align-content: stretch;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 18px;
  border-color: var(--ds-border);
  background: #ffffff;
  padding: 24px;
}

.home-profile-head,
.home-name-row,
.home-panel-actions {
  display: flex;
  align-items: center;
}

.home-profile-head {
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--ds-border);
  padding-bottom: 14px;
}

.home-profile-head p { margin: 0 0 3px; }
.home-profile-head > div > span { color: var(--ds-text-faint); font-size: 10px; }
.profile-edit-button { min-height: 34px; border-color: #d9e0ff; background: var(--ds-brand-soft); color: var(--ds-brand); padding: 6px 11px; font-size: 11px; }

.home-profile-identity {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: start;
  gap: 22px;
  min-width: 0;
}

.profile-avatar-shell {
  position: relative;
  display: grid;
  width: 150px;
  height: 184px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #dfe4ff;
  border-radius: 18px;
  background: linear-gradient(145deg, var(--ds-brand-soft), var(--ds-brand-soft-strong));
  color: var(--ds-brand);
  box-shadow: 0 10px 24px rgba(70, 95, 255, .12);
}

.profile-avatar-shell::after {
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 12px;
  content: "";
  pointer-events: none;
}

.profile-avatar-shell img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-shell > span { font-size: 34px; font-weight: 850; letter-spacing: -.06em; }
.home-copy { min-width: 0; }
.home-name-row { flex-wrap: wrap; gap: 10px; }
.home-copy .home-name-row h2 { margin: 0; color: var(--ds-text); font-size: clamp(28px, 2.4vw, 38px); }
.home-name-row > span { border-radius: 999px; background: var(--ds-brand-soft); color: var(--ds-brand); padding: 5px 9px; font-size: 10px; font-weight: 750; }
.home-copy .hero-lead { max-width: none; margin: 7px 0 12px; color: var(--ds-text-muted); font-size: 12px; line-height: 1.65; }

.home-profile-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px 14px;
  margin: 0;
}

.home-profile-facts > div { min-width: 0; }
.home-profile-facts dt { color: var(--ds-text-faint); font-size: 9px; }
.home-profile-facts dd { overflow: hidden; margin: 2px 0 0; color: var(--ds-text-secondary); font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.home-copy .chip-row { gap: 5px; margin-top: 12px; }
.home-copy .chip { min-height: 24px; border: 0; background: var(--ds-surface-muted); color: var(--ds-text-secondary); padding: 3px 8px; font-size: 9px; box-shadow: none; }
.home-profile-panel .metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.home-profile-panel .metric { min-height: 66px; border: 1px solid var(--ds-border); border-radius: 11px; background: var(--ds-surface-subtle); padding: 10px 11px; }
.home-profile-panel .metric span, .home-profile-panel .metric small { font-size: 9px; }
.home-profile-panel .metric strong { margin: 2px 0; color: var(--ds-text-secondary); font-size: 19px; }

.home-overview > .carousel-shell {
  height: 420px;
  min-height: 420px;
  border: 1px solid var(--ds-border);
  border-radius: 18px;
  background: var(--ds-border);
}

.carousel-frame { height: 100%; }
.home-overview .carousel-shell img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: center;
}

.home-today-panel { background: #ffffff; }
.today-panel-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.today-card,
.today-card.done,
.today-card.warn,
.today-card.todo {
  position: relative;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  min-height: 132px;
  align-content: start;
  gap: 4px 9px;
  border: 1px solid var(--ds-border);
  border-style: solid;
  border-radius: 13px;
  background: #ffffff;
  padding: 13px;
}
.today-card:hover { border-color: #c7d0ff; background: #fbfcff; transform: translateY(-1px); }
.today-card-icon { display: grid; width: 32px; height: 32px; grid-row: 1 / span 2; place-items: center; border-radius: 9px; background: var(--ds-brand-soft); color: var(--ds-brand) !important; font-size: 13px !important; }
.today-card.warn .today-card-icon { background: #fff4e5; color: #dc6803 !important; }
.today-card.done .today-card-icon { background: var(--ds-success-soft); color: var(--ds-success) !important; }
.today-card-label { align-self: end; color: var(--ds-text-muted) !important; font-size: 9px !important; }
.today-card strong { grid-column: 2; overflow: hidden; color: var(--ds-text); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.today-card small { grid-column: 1 / -1; margin-top: 7px; color: var(--ds-text-muted); font-size: 10px; line-height: 1.5; }
.today-card i { position: absolute; right: 11px; bottom: 9px; color: #c0c7d4; font-size: 12px; font-style: normal; }

.daily-todo-panel, .home-highlights-panel { min-height: 340px; }
.daily-todo-panel .panel-head, .home-highlights-panel .panel-head { align-items: center; }
.home-panel-actions { flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.home-panel-actions button, .home-highlights-panel .panel-head > button { min-height: 34px; font-size: 10px; }
.daily-todo-date { width: 145px; }
.daily-todo-list { gap: 0; overflow: hidden; border: 1px solid var(--ds-border); border-radius: 13px; background: #fff; }
.daily-todo-item, .daily-todo-item.done {
  grid-template-columns: 30px minmax(0, 1fr) 28px;
  min-height: 62px;
  gap: 10px;
  border: 0;
  border-top: 1px solid var(--ds-surface-muted);
  border-radius: 0;
  background: #ffffff;
  padding: 9px 12px;
}
.daily-todo-item:first-child { border-top: 0; }
.daily-todo-item:hover { background: #fafbff; }
.todo-check span { width: 22px; height: 22px; border: 1.5px solid #b9c0cc; border-radius: 50%; background: #fff; }
.todo-check input:checked + span { border-color: var(--ds-success); background: var(--ds-success); }
.todo-item-copy { display: grid; min-width: 0; gap: 4px; }
.todo-item-copy strong { overflow: hidden; color: var(--ds-text-secondary); font-size: 11px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.todo-item-copy > span { color: var(--ds-text-faint); font-size: 9px; }
.daily-todo-item.done .todo-item-copy strong { color: var(--ds-text-faint); text-decoration: line-through; }
.todo-priority { border-radius: 999px; background: var(--ds-surface-muted); color: var(--ds-text-muted); padding: 2px 5px; font-style: normal; }
.todo-priority.high { background: var(--ds-danger-soft); color: var(--ds-danger); }
.todo-priority.low { background: var(--ds-success-soft); color: var(--ds-success); }
.delete-todo-btn, .delete-highlight-btn { display: grid; min-height: 26px; height: 26px; place-items: center; border: 0; background: transparent; color: var(--ds-text-faint); padding: 0; box-shadow: none; }
.delete-todo-btn:hover, .delete-highlight-btn:hover { background: var(--ds-danger-soft); color: var(--ds-danger); }

.home-highlights-panel .highlight-list { display: grid; grid-template-columns: 1fr; gap: 0; overflow: hidden; border: 1px solid var(--ds-border); border-radius: 13px; background: #fff; }
.highlight-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto 26px;
  align-items: center;
  min-height: 62px;
  gap: 10px;
  border: 0;
  border-top: 1px solid var(--ds-surface-muted);
  border-radius: 0;
  background: #ffffff;
  padding: 9px 12px;
}
.highlight-item:first-child { border-top: 0; }
.highlight-item:hover { background: #fafbff; }
.highlight-marker { display: grid !important; width: 30px; height: 30px; place-items: center; border-radius: 9px; background: #fff4e5; color: #dc6803 !important; font-size: 11px !important; }
.highlight-item.progress .highlight-marker { background: var(--ds-brand-soft); color: var(--ds-brand) !important; }
.highlight-item.learning .highlight-marker { background: var(--ds-success-soft); color: var(--ds-success) !important; }
.highlight-item.life .highlight-marker { background: #f4f3ff; color: var(--ds-brand) !important; }
.highlight-copy { min-width: 0; }
.highlight-copy strong, .highlight-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.highlight-copy strong { color: var(--ds-text-secondary); font-size: 11px; }
.highlight-copy span { margin-top: 3px; color: var(--ds-text-muted); font-size: 9px; }
.highlight-item time { color: var(--ds-text-faint); font-size: 9px; white-space: nowrap; }

.home-empty-state { display: grid; justify-items: center; gap: 4px; border: 0; background: #fff; color: var(--ds-text-faint); padding: 34px 18px; text-align: center; }
.home-empty-state > span { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; background: var(--ds-surface-muted); color: var(--ds-text-muted); font-size: 20px; }
.home-empty-state strong { margin-top: 5px; color: var(--ds-text-secondary); font-size: 11px; }
.home-empty-state p { margin: 0; font-size: 9px; }

.profile-editor-modal-panel { width: min(780px, 96vw); }
.profile-avatar-editor { display: grid; grid-template-columns: 110px minmax(0, 1fr); align-items: center; gap: 18px; margin-bottom: 18px; border: 1px solid var(--ds-brand-soft-strong); border-radius: 14px; background: #f8f9ff; padding: 14px; }
.profile-avatar-preview-shell { width: 96px; height: 116px; border-radius: 14px; }
.profile-avatar-editor strong { color: var(--ds-text-secondary); font-size: 12px; }
.profile-avatar-editor p { margin: 4px 0 10px; color: var(--ds-text-muted); font-size: 10px; }
.profile-avatar-editor .button-row { justify-content: flex-start; }
.profile-avatar-editor .upload-label { width: auto; margin: 0; }
.profile-editor-grid, .compact-entry-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.profile-editor-grid label, .compact-entry-form label { display: grid; gap: 5px; color: var(--ds-text-secondary); font-size: 10px; font-weight: 700; }
.profile-editor-grid .wide-field, .compact-entry-form .wide-field { grid-column: 1 / -1; }
.profile-birth-month-field { position: relative; display: grid; align-content: start; gap: 5px; min-width: 0; }
.profile-field-label { color: var(--ds-text-secondary); font-size: 10px; font-weight: 700; }
.profile-birth-month-picker { position: relative; min-width: 0; }
.profile-birth-month-trigger { display: flex; width: 100%; min-height: var(--ds-control-height); align-items: center; justify-content: space-between; border: 1px solid var(--ds-border-strong); border-radius: var(--ds-control-radius); background: var(--ds-surface); padding: 9px 12px; color: var(--ds-text); font-size: var(--ds-font-size-body); font-weight: 500; text-align: left; box-shadow: none; }
.profile-birth-month-trigger:hover { border-color: var(--ds-border-hover); background: var(--ds-surface); }
.profile-birth-month-trigger[aria-expanded="true"] { border-color: var(--admin-primary); box-shadow: 0 0 0 4px rgba(70, 95, 255, 0.12); }
.profile-birth-month-trigger span.is-placeholder { color: var(--ds-placeholder); }
.profile-birth-month-trigger svg { width: 17px; height: 17px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; color: var(--ds-text-muted); }
.profile-birth-month-popover { position: absolute; z-index: 80; top: calc(100% + 8px); left: 0; width: min(320px, calc(100vw - 40px)); border: 1px solid var(--ds-border); border-radius: 12px; background: var(--ds-surface); padding: 10px; box-shadow: var(--ds-shadow-float); }
.profile-birth-picker-head { display: grid; grid-template-columns: 36px 1fr 36px; align-items: center; gap: 8px; margin-bottom: 8px; }
.profile-birth-picker-head strong { color: var(--ds-text); font-size: 13px; text-align: center; }
.profile-birth-picker-head button { display: grid; width: 36px; min-height: 36px; place-items: center; border: 0; border-radius: 8px; background: transparent; padding: 0; color: var(--ds-text-muted); box-shadow: none; }
.profile-birth-picker-head button:hover:not(:disabled) { background: var(--ds-surface-muted); color: var(--ds-text); }
.profile-birth-picker-head svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.profile-birth-month-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.profile-birth-month-grid button { min-width: 0; min-height: 38px; border: 0; border-radius: 8px; background: transparent; padding: 6px 4px; color: var(--ds-text-secondary); font-size: 12px; font-weight: 500; box-shadow: none; }
.profile-birth-month-grid button:hover:not(:disabled) { background: var(--ds-surface-muted); color: var(--ds-text); }
.profile-birth-month-grid button.is-selected { background: var(--ds-brand-soft); color: var(--ds-brand); font-weight: 700; }
.profile-birth-picker-actions { display: flex; justify-content: space-between; margin-top: 8px; border-top: 1px solid var(--ds-border); padding-top: 8px; }
.profile-birth-picker-actions button { min-height: 32px; border: 0; background: transparent; padding: 4px 8px; color: var(--ds-brand); font-size: 11px; box-shadow: none; }
.profile-birth-picker-actions button:hover { background: var(--ds-brand-soft); }
.compact-entry-modal-panel { width: min(580px, 96vw); }

@media (max-width: 1380px) {
  .today-panel-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1180px) {
  .home-overview > .carousel-shell { height: min(58vw, 520px); min-height: 360px; }
  .home-profile-panel { min-height: 0; }
}

@media (max-width: 760px) {
  .home-profile-identity { grid-template-columns: 104px minmax(0, 1fr); gap: 14px; }
  .profile-avatar-shell { width: 104px; height: 132px; border-radius: 14px; }
  .home-profile-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .today-panel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-profile-panel .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-panel-actions { width: 100%; justify-content: stretch; }
  .home-panel-actions > * { flex: 1 1 130px; }
}

@media (max-width: 520px) {
  .home-profile-head { align-items: flex-start; }
  .home-profile-identity { grid-template-columns: 1fr; }
  .profile-avatar-shell { width: 112px; height: 138px; }
  .today-panel-grid { grid-template-columns: 1fr; }
  .home-overview > .carousel-shell { height: 270px; min-height: 270px; }
  .daily-todo-panel .panel-head, .home-highlights-panel .panel-head { align-items: stretch; flex-direction: column; }
  .home-highlights-panel .panel-head > button { width: 100%; }
  .highlight-item { grid-template-columns: 32px minmax(0, 1fr) 26px; }
  .highlight-item time { grid-column: 2; grid-row: 2; }
  .delete-highlight-btn { grid-column: 3; grid-row: 1 / span 2; }
  .profile-avatar-editor { grid-template-columns: 1fr; }
  .profile-editor-grid, .compact-entry-form { grid-template-columns: 1fr; }
  .profile-editor-grid .wide-field, .compact-entry-form .wide-field { grid-column: auto; }
  .profile-birth-month-popover { width: min(100%, 320px); }
}

/* Home workspace v3: execution-first personal command center. */
#page-home {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px;
}

#page-home .home-overview {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.home-command-bar,
.home-execution-panel,
.home-status-panel { grid-column: 1 / -1; }
.home-command-bar { order: 1; }
#page-home .carousel-shell { grid-column: 1 / -1; order: 2; }
.home-execution-panel { order: 3; }
.home-status-panel { order: 4; }
.home-annual-panel,
.home-calendar-panel { order: 5; }
#page-home .home-profile-panel,
.home-reminders-panel { grid-column: span 6; order: 6; align-self: stretch; }
.home-highlights-panel { display: none !important; }
.home-annual-panel { grid-column: span 7; }
.home-calendar-panel { grid-column: span 5; }

.home-command-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-width: 0;
  border: 1px solid #dfe4ff;
  border-radius: 18px;
  background: linear-gradient(125deg, #f8f9ff 0%, #ffffff 58%, #f2f6ff 100%);
  min-height: 88px;
  padding: 13px 20px;
  box-shadow: 0 10px 28px rgba(70, 95, 255, .07);
}

.home-command-copy { min-width: 0; }
.home-command-copy .eyebrow { display: none; }
.home-section-heading .eyebrow,
.home-calendar-head .eyebrow { margin: 0 0 4px; }
.home-command-copy h2 { margin: 0; color: var(--ds-text); font-size: clamp(20px, 2vw, 24px); letter-spacing: -.035em; }
.home-command-copy > p:last-child { margin: 3px 0 0; color: var(--ds-text-muted); font-size: 13px; }
.home-command-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.home-command-actions button { min-height: 36px; padding: 7px 12px; font-size: 12px; }

#page-home .panel,
#page-home .home-profile-panel,
#page-home .carousel-shell {
  min-width: 0;
  border: 1px solid var(--ds-border);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(43, 50, 79, .045);
}

#page-home .panel { padding: 22px; }
.home-execution-panel { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 0; padding: 0 !important; overflow: hidden; }
.home-execution-main { min-width: 0; padding: 16px 20px; }
.home-brief-panel { display: flex; min-width: 0; flex-direction: column; border-left: 1px solid var(--ds-border); background: #fafbff; padding: 20px; }
.home-section-heading,
.home-calendar-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.home-section-heading h2,
.home-calendar-head h2 { margin: 0; color: var(--ds-text); font-size: 19px; line-height: 1.35; }
.home-status-badge,
.home-ai-label { display: inline-flex; min-height: 28px; align-items: center; border-radius: 999px; background: var(--ds-brand-soft); color: var(--ds-brand); padding: 5px 10px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.home-ai-label { background: var(--ds-surface-muted); color: var(--ds-text-muted); }
.home-section-heading > div > span { display: block; margin-top: 4px; color: var(--ds-text-muted); font-size: 11px; }
.home-execution-date-tools { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.home-execution-date-tools button { min-height: 32px; padding: 5px 9px; font-size: 10px; }
.home-execution-date-tools .date-step-button { width: 32px; min-width: 32px; padding: 0; font-size: 18px; }
.home-execution-date-tools .daily-todo-date { width: 134px; min-height: 32px; font-size: 11px; }

.home-progress-summary { display: grid; grid-template-columns: 74px minmax(0, 1fr); align-items: center; gap: 14px; margin: 10px 0; }
.home-progress-ring {
  --home-progress: 0;
  position: relative;
  display: grid;
  width: 68px;
  height: 68px;
  place-content: center;
  border-radius: 50%;
  background: conic-gradient(var(--ds-brand) calc(var(--home-progress) * 1%), #eef2f6 0);
  text-align: center;
}
.home-progress-ring::after { position: absolute; inset: 8px; border-radius: inherit; background: #fff; content: ""; }
.home-progress-ring strong,
.home-progress-ring span { position: relative; z-index: 1; }
.home-progress-ring strong { color: var(--ds-text); font-size: 18px; }
.home-progress-ring span { color: var(--ds-text-faint); font-size: 10px; }
.home-progress-copy { display: grid; gap: 7px; }
.home-progress-copy > strong { color: var(--ds-text-secondary); font-size: 16px; }
.home-progress-copy > span { color: var(--ds-text-muted); font-size: 13px; }
.home-linear-progress { overflow: hidden; height: 7px; margin-top: 6px; border-radius: 999px; background: #eef2f6; }
.home-linear-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--ds-brand), var(--ds-brand)); transition: width .25s ease; }

.home-execution-list { display: grid; max-height: 174px; gap: 0; overflow-y: auto; }
.home-execution-item { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 11px; min-height: 52px; border: 1px solid var(--ds-border); border-radius: 12px; background: #fff; padding: 9px 12px; }
.home-execution-item.done { background: #f8fbf9; }
.home-task-status { display: grid; width: 23px; height: 23px; place-items: center; border: 1.5px solid #b9c0cc; border-radius: 50%; color: #fff; font-size: 12px; font-weight: 900; }
.home-execution-item.done .home-task-status { border-color: var(--ds-success); background: var(--ds-success); }
.home-execution-item > div { min-width: 0; }
.home-execution-item strong,
.home-execution-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-execution-item strong { color: var(--ds-text-secondary); font-size: 13px; }
.home-execution-item.done strong { color: var(--ds-text-faint); text-decoration: line-through; }
.home-execution-item small { margin-top: 3px; color: var(--ds-text-faint); font-size: 11px; }
.home-execution-item time { color: var(--ds-text-muted); font-size: 11px; white-space: nowrap; }
.home-execution-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 10px; }
.home-execution-actions button { min-height: 34px; font-size: 10px; }
.home-execution-main.is-empty #clearCompletedTodosBtn,
.home-execution-main.is-empty #openTodoModalBtn { display: none; }

.home-brief-list { display: grid; gap: 8px; margin: 14px 0; }
.home-brief-list article { border-left: 3px solid #a4bcfd; border-radius: 0 10px 10px 0; background: #fff; padding: 11px 12px; }
.home-brief-list article.risk { border-left-color: var(--ds-warning); background: #fffcf5; }
.home-brief-list article.good { border-left-color: var(--ds-success); }
.home-brief-list span,
.home-brief-list strong { display: block; }
.home-brief-list span { color: var(--ds-text-faint); font-size: 10px; font-weight: 800; }
.home-brief-list strong { margin-top: 4px; color: var(--ds-text-secondary); font-size: 12px; line-height: 1.55; }
.home-brief-panel > button { width: 100%; margin-top: auto; border-color: #d9e0ff; color: var(--ds-brand); }

.home-status-panel .panel-head { margin-bottom: 14px; }
#page-home .today-panel-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
#page-home .today-card,
#page-home .today-card.done,
#page-home .today-card.warn,
#page-home .today-card.todo { min-height: 132px; padding: 15px; }
#page-home .today-card-label { font-size: 11px !important; }
#page-home .today-card strong { font-size: 15px; }
#page-home .today-card small { font-size: 12px; }

#page-home .home-reminders-panel { min-height: 300px; }
#page-home .home-reminders-panel .panel-head { min-height: 46px; }
.home-panel-actions { gap: 6px; }
.home-panel-actions .date-step-button { width: 36px; min-width: 36px; padding: 0; font-size: 21px; }
#page-home .daily-todo-date { width: 146px; min-height: 36px; }
#page-home .daily-todo-list { overflow-y: auto; border: 1px solid var(--ds-border); border-radius: 13px; }
#page-home .home-highlights-panel .highlight-list { max-height: 228px; overflow-y: auto; }
#page-home .home-empty-state { min-height: 168px; place-content: center; padding: 24px 18px; }
#page-home .home-empty-state.compact { min-height: 100px; border: 1px dashed var(--ds-border-strong); border-radius: 12px; }
#page-home .home-empty-state button { min-height: 34px; margin-top: 8px; font-size: 10px; }
#page-home .home-execution-list:has(.home-empty-state) { overflow: hidden; }
#page-home .home-execution-list .home-empty-state { min-height: 140px; padding: 12px 16px; }

.home-reminder-list { display: grid; gap: 7px; }
.home-reminder-item { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 9px; min-height: 51px; border: 1px solid var(--ds-border); border-radius: 11px; background: #fff; padding: 8px 10px; text-align: left; box-shadow: none; }
.home-reminder-item:hover { border-color: #c7d0ff; background: #fbfcff; }
.home-reminder-item > span { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; background: var(--ds-surface-muted); color: var(--ds-text-muted); font-size: 11px; font-weight: 900; }
.home-reminder-item.risk > span { background: var(--ds-danger-soft); color: var(--ds-danger); }
.home-reminder-item.attention > span { background: #fff4e5; color: #dc6803; }
.home-reminder-item > div { min-width: 0; }
.home-reminder-item strong,
.home-reminder-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-reminder-item strong { color: var(--ds-text-secondary); font-size: 11px; }
.home-reminder-item small { margin-top: 3px; color: var(--ds-text-faint); font-size: 9px; }
.home-reminder-item > i { color: #c0c7d4; font-size: 11px; font-style: normal; }
#page-home .home-highlights-panel .highlight-copy strong { display: -webkit-box; overflow: hidden; white-space: normal; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
#page-home .home-highlights-panel .highlight-copy span { font-size: 10px; }

.home-annual-panel,
.home-calendar-panel { min-height: 340px; }
.home-annual-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.home-annual-metrics article { display: grid; min-width: 0; gap: 5px; border: 1px solid var(--ds-border); border-radius: 13px; background: #fcfcfd; padding: 16px; }
.home-annual-metrics span { color: var(--ds-text-muted); font-size: 12px; }
.home-annual-metrics strong { color: var(--ds-text); font-size: 24px; }
.home-annual-metrics small { color: var(--ds-text-faint); font-size: 11px; line-height: 1.45; }

.home-calendar-head > div:last-child { display: flex; gap: 6px; }
.home-calendar-head button { width: 34px; min-height: 34px; padding: 0; font-size: 18px; }
.home-calendar-weekdays,
.home-mini-calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.home-calendar-weekdays { margin: 16px 0 7px; color: var(--ds-text-faint); font-size: 10px; text-align: center; }
.home-mini-calendar > button { position: relative; display: grid; min-height: 35px; place-content: center; gap: 1px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--ds-text-secondary); padding: 2px; box-shadow: none; }
.home-mini-calendar > button:hover,
.home-mini-calendar > button.selected { border-color: #a4bcfd; background: var(--ds-brand-soft); color: var(--ds-brand-strong); }
.home-mini-calendar > button.today span { display: grid; width: 23px; height: 23px; place-items: center; border-radius: 50%; background: var(--ds-brand); color: #fff; }
.home-mini-calendar > button::after { position: absolute; left: 50%; bottom: 3px; width: 5px; height: 5px; border-radius: 50%; background: transparent; content: ""; transform: translateX(-50%); }
.home-mini-calendar > button.has-task::after { background: var(--ds-brand); }
.home-mini-calendar > button.partial::after { background: var(--ds-warning); }
.home-mini-calendar > button.all-done::after { width: 11px; height: 7px; border: solid var(--ds-success); border-width: 0 0 2px 2px; border-radius: 0; background: transparent; transform: translateX(-50%) rotate(-45deg); }
.home-mini-calendar small { color: var(--ds-text-faint); font-size: 7px; }
.home-calendar-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; color: var(--ds-text-muted); font-size: 10px; }
.home-calendar-legend span { display: flex; align-items: center; gap: 5px; }
.home-calendar-legend i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ds-brand); }
.home-calendar-legend i.partial { background: var(--ds-warning); }
.home-calendar-legend i.all-done { border-radius: 2px; background: var(--ds-success); }

#page-home .home-profile-panel { min-height: 0; grid-template-rows: auto auto auto; gap: 12px; align-content: start; padding: 18px; }
#page-home .home-profile-identity { grid-template-columns: 90px minmax(0, 1fr); align-items: center; gap: 14px; }
#page-home .profile-avatar-shell { width: 90px; height: 108px; border-radius: 14px; }
#page-home .home-copy .home-name-row h2 { font-size: clamp(24px, 2.2vw, 32px); }
#page-home .home-copy .hero-lead { margin-bottom: 13px; font-size: 13px; }
.profile-detail-link { min-height: 34px; border-color: #d9e0ff; background: #f8f9ff; color: var(--ds-brand); font-size: 11px; }
#page-home .home-profile-panel .metric { min-height: 64px; padding: 9px; }
#page-home .home-profile-panel .metric span,
#page-home .home-profile-panel .metric small { font-size: 10px; }
#page-home .home-profile-panel .metric strong { font-size: 21px; }

#page-home .carousel-shell { width: 100%; height: auto; min-height: 280px; max-height: 420px; aspect-ratio: var(--carousel-aspect, 18 / 7); overflow: hidden; isolation: isolate; background: #111827; }
#page-home .carousel-shell .carousel-backdrop { position: absolute; inset: -24px; z-index: 0; width: calc(100% + 48px); height: calc(100% + 48px); min-height: 0; object-fit: cover; object-position: center; filter: blur(22px) saturate(.82); opacity: .56; transform: scale(1.06); }
.carousel-image-link { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; border: 0; border-radius: 0; background: transparent; padding: 0; box-shadow: none; }
.carousel-image-link:hover { transform: none; }
#page-home .carousel-shell #carouselImage { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; object-fit: contain; object-position: center; }
.carousel-caption { position: absolute; inset: auto 0 0; z-index: 2; display: grid; gap: 3px; background: linear-gradient(transparent, rgba(16,24,40,.78)); color: #fff; padding: 70px 24px 22px; pointer-events: none; }
.carousel-caption span { font-size: 10px; font-weight: 850; letter-spacing: .1em; }
.carousel-caption strong { font-size: 19px; }
.carousel-caption small { color: rgba(255,255,255,.78); font-size: 12px; }
.carousel-manage { position: absolute; top: 12px; right: 12px; z-index: 4; opacity: 0; transition: opacity .18s ease; }
.carousel-shell:hover .carousel-manage,
.carousel-manage[open],
.carousel-manage:focus-within { opacity: 1; }
.carousel-manage summary { min-height: 34px; border: 1px solid rgba(255,255,255,.55); border-radius: 9px; background: rgba(255,255,255,.9); color: var(--ds-text-secondary); cursor: pointer; list-style: none; padding: 8px 11px; font-size: 11px; font-weight: 800; backdrop-filter: blur(8px); }
.carousel-manage summary::-webkit-details-marker { display: none; }
.carousel-manage > div { position: absolute; top: 40px; right: 0; display: grid; width: 160px; gap: 6px; border: 1px solid var(--ds-border); border-radius: 11px; background: #fff; padding: 8px; box-shadow: 0 12px 28px rgba(16,24,40,.15); }
.carousel-manage .upload-label,
.carousel-manage button { width: 100%; min-height: 34px; margin: 0; justify-content: center; font-size: 10px; }
body.public-mode .carousel-manage { display: none !important; }

@media (max-width: 1180px) {
  .home-reminders-panel,
  .home-annual-panel,
  .home-calendar-panel,
  #page-home .home-profile-panel,
  #page-home .carousel-shell { grid-column: 1 / -1; }
  .home-execution-panel { grid-template-columns: minmax(0, 1.45fr) minmax(280px, .75fr); }
  #page-home .carousel-shell { height: auto; min-height: 240px; }
}

@media (max-width: 820px) {
  #page-home { padding: 18px; }
  #page-home .home-overview { gap: 18px; }
  .home-command-bar { align-items: stretch; flex-direction: column; }
  .home-command-actions { justify-content: flex-start; }
  .home-execution-panel { grid-template-columns: 1fr; }
  .home-brief-panel { border-top: 1px solid var(--ds-border); border-left: 0; }
  #page-home .today-panel-grid,
  .home-annual-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #page-home .home-reminders-panel .panel-head { align-items: stretch; flex-direction: column; }
  .home-panel-actions { justify-content: flex-start; }
}

@media (max-width: 540px) {
  #page-home { padding: 14px; }
  #page-home .home-overview { gap: 14px; }
  .home-command-bar,
  #page-home .panel,
  #page-home .home-profile-panel { padding: 17px; }
  .home-command-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-execution-panel { padding: 0 !important; }
  .home-execution-main,
  .home-brief-panel { padding: 18px; }
  .home-execution-main > .home-section-heading { align-items: stretch; flex-direction: column; }
  .home-execution-date-tools { width: 100%; justify-content: flex-start; }
  .home-execution-date-tools .daily-todo-date { flex: 1 1 130px; width: auto; }
  .home-progress-summary { grid-template-columns: 78px minmax(0, 1fr); gap: 13px; }
  .home-progress-ring { width: 74px; height: 74px; }
  .home-progress-ring strong { font-size: 18px; }
  #page-home .today-panel-grid,
  .home-annual-metrics { grid-template-columns: 1fr; }
  .home-panel-actions > * { flex: 1 1 110px; }
  .home-panel-actions .date-step-button { flex: 0 0 36px; }
  #page-home .daily-todo-date { flex: 1 1 138px; width: auto; }
  #page-home .home-profile-identity { grid-template-columns: 82px minmax(0, 1fr); }
  #page-home .profile-avatar-shell { width: 82px; height: 100px; }
  #page-home .home-profile-panel .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #page-home .carousel-shell { height: auto; min-height: 190px; max-height: 300px; }
  .carousel-manage { opacity: 1; }
  .carousel-caption { padding-right: 18px; padding-left: 18px; }
}

.ai-profile-toolbar > div { display: flex; align-items: end; gap: 7px; }
.ai-custom-toggle { display: flex; align-items: center; gap: 5px; margin-top: 6px; color: var(--ds-text-muted); font-size: 9px; }
.ai-advanced-config { border: 1px solid var(--ds-border); border-radius: 11px; }
.ai-advanced-config > summary { cursor: pointer; padding: 10px 12px; color: var(--ds-text-secondary); font-size: 10px; font-weight: 800; }
.ai-advanced-config > .ai-config-grid { border-top: 1px solid var(--ds-border); padding: 12px; }
.ai-security-note { align-items: center; }
.ai-payload-preview { max-height: 190px; overflow: auto; border: 1px solid #d1fadf; border-radius: 10px; background: #f6fef9; color: #05603a; padding: 12px; white-space: pre-wrap; font-size: 9px; line-height: 1.6; }
.ai-config-modal-panel { max-height: min(760px, calc(100vh - 32px)); }
.ai-config-modal-panel .modal-body { overflow: auto; }
.ai-config-modal-panel .modal-actions { position: sticky; z-index: 2; bottom: 0; background: #fff; }
@media (max-width: 620px) {
  .ai-security-note { align-items: flex-start; }
}

/* Annual execution workspace v2 */
#page-annual { max-width: 1440px; margin: 0 auto; padding: 0 24px 32px; }
#page-annual .annual-page-heading { min-height: 0; margin-bottom: 18px; padding: 20px 0 0; text-align: left; }
#page-annual .annual-page-heading .eyebrow { margin-bottom: 5px; }
#page-annual .annual-page-heading h2 { font-size: clamp(26px, 3vw, 38px); }
#page-annual .annual-page-heading .page-heading-note { margin-top: 5px; }
#page-annual .annual-page-heading .page-actions { position: absolute; top: 20px; right: 0; }
#page-annual .annual-stats { display: none; }
#page-annual .annual-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 20px; }
#page-annual .annual-tabs button { min-height: 72px; border: 1px solid var(--ds-border); border-radius: 14px; background: #fff; padding: 12px 14px; box-shadow: none; }
#page-annual .annual-tabs button.active { border-color: #8098f9; background: var(--ds-brand-soft); box-shadow: 0 8px 22px rgba(68,76,231,.1); }
#page-annual .annual-tab-code { width: 30px; height: 30px; border-radius: 9px; font-size: 12px; }
#page-annual .annual-tabs strong { font-size: 13px; }
#page-annual .annual-tabs small { margin-top: 2px; font-size: 10px; }
#page-annual .annual-content { min-height: 0; }
#page-annual .panel { border-color: var(--ds-border); border-radius: 16px; box-shadow: 0 8px 24px rgba(16,24,40,.045); }

.annual-overview-page,
.annual-auto-review-page { display: grid; gap: 18px; }
.annual-key-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.annual-key-metrics article { display: grid; min-height: 108px; align-content: center; gap: 4px; border: 1px solid var(--ds-border); border-radius: 15px; background: #fff; padding: 17px 18px; }
.annual-key-metrics span { color: var(--ds-text-muted); font-size: 11px; }
.annual-key-metrics strong { color: var(--ds-text); font-size: 26px; line-height: 1; }
.annual-key-metrics small { color: var(--ds-text-faint); font-size: 10px; }

.annual-phase-summary { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(240px, .7fr) auto; align-items: center; gap: 22px; padding: 20px 22px; }
.annual-phase-summary h2 { margin: 4px 0 5px; color: var(--ds-text); font-size: 21px; }
.annual-phase-summary p { margin: 0; color: var(--ds-text-muted); font-size: 11px; line-height: 1.6; }
.annual-phase-facts { display: grid; gap: 4px; border-left: 1px solid var(--ds-border); padding-left: 22px; }
.annual-phase-facts span, .annual-phase-facts small { color: var(--ds-text-muted); font-size: 10px; }
.annual-phase-facts strong { color: var(--ds-brand-strong); font-size: 17px; }

.annual-calendar-board { padding: 22px; }
.annual-calendar-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.annual-calendar-toolbar h2 { margin: 4px 0; color: var(--ds-text); font-size: 20px; }
.annual-calendar-toolbar p { margin: 0; color: var(--ds-text-muted); font-size: 11px; }
.annual-calendar-actions { display: flex; align-items: center; gap: 6px; }
.annual-calendar-actions button { min-height: 34px; padding: 7px 11px; }
.annual-calendar-actions button.active { border-color: var(--ds-brand); background: var(--ds-brand-soft); color: var(--ds-brand-strong); }
.annual-calendar-actions input { width: 150px; min-height: 34px; }
.annual-year-calendar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.annual-year-calendar .annual-mini-days > i,
.annual-year-calendar .annual-mini-days > span { min-height: 20px; }
.annual-year-calendar > article { min-width: 0; border: 1px solid var(--ds-border); border-radius: 13px; background: #fcfcfd; padding: 11px; }
.annual-year-calendar > article > button { display: flex; width: 100%; min-height: 30px; align-items: center; justify-content: space-between; border: 0; background: transparent; padding: 0 2px 7px; box-shadow: none; }
.annual-year-calendar > article > button strong { color: var(--ds-text-secondary); font-size: 12px; }
.annual-year-calendar > article > button small { color: var(--ds-text-faint); font-size: 9px; }
.annual-mini-week, .annual-mini-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.annual-mini-week { margin-bottom: 3px; color: var(--ds-text-faint); font-size: 7px; text-align: center; }
.annual-mini-days > i { min-height: 25px; }
.annual-mini-days > span, .annual-mini-days > button { position: relative; display: grid; min-width: 0; min-height: 25px; place-items: center; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--ds-text-muted); padding: 1px; box-shadow: none; }
.annual-mini-days b { font-size: 8px; font-weight: 700; }
.annual-mini-days .has-task { background: var(--ds-brand-soft); color: var(--ds-brand-strong); }
.annual-mini-days .partial { background: #fff7e8; color: var(--ds-warning); }
.annual-mini-days .complete { background: var(--ds-success-soft); color: var(--ds-success); }
.annual-mini-days .selected { border-color: var(--ds-brand); box-shadow: inset 0 0 0 1px var(--ds-brand); }
.annual-month-calendar-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(310px, .6fr); gap: 18px; margin-top: 18px; }
.annual-month-calendar { border: 1px solid var(--ds-border); border-radius: 14px; padding: 16px; }
.annual-month-calendar > header, .annual-checkin-month-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.annual-month-calendar > header button, .annual-checkin-month-head button { width: 34px; min-height: 34px; padding: 0; }
.annual-month-calendar .annual-mini-week { font-size: 10px; }
.annual-month-calendar .annual-mini-days { gap: 5px; }
.annual-month-calendar .annual-mini-days > i,
.annual-month-calendar .annual-mini-days > button { min-height: 48px; }
.annual-month-calendar .annual-mini-days b { font-size: 11px; }
.annual-date-agenda { display: grid; align-content: start; gap: 12px; }
.annual-date-agenda > div:first-child { display: grid; gap: 3px; }
.annual-date-agenda > div:first-child span, .annual-date-agenda > div:first-child small { color: var(--ds-text-muted); font-size: 10px; }
.annual-date-agenda > div:first-child strong { color: var(--ds-text); font-size: 19px; }
.annual-date-event-list { display: grid; gap: 7px; }
.annual-date-event-list article { display: grid; grid-template-columns: 7px minmax(0, 1fr) auto; align-items: center; gap: 9px; border: 1px solid var(--ds-border); border-radius: 10px; padding: 10px; }
.annual-date-event-list article > i { width: 7px; height: 28px; border-radius: 9px; background: var(--ds-brand); }
.annual-date-event-list strong, .annual-date-event-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.annual-date-event-list strong { color: var(--ds-text-secondary); font-size: 11px; }
.annual-date-event-list small { margin-top: 2px; color: var(--ds-text-faint); font-size: 8px; }
.annual-event-form, .annual-weekly-plan-form, .annual-temporary-task-form { display: grid; gap: 8px; border-top: 1px solid var(--ds-border); padding-top: 12px; }
.annual-event-form { grid-template-columns: 1fr 145px; }
.annual-event-form select, .annual-event-form button { grid-column: span 2; }
.annual-event-form label, .annual-weekly-plan-form label, .annual-temporary-task-form label { display: flex; align-items: center; gap: 6px; color: var(--ds-text-muted); font-size: 10px; }
.annual-event-form label { grid-column: span 1; }
.annual-event-form label input, .annual-weekly-plan-form label input, .annual-temporary-task-form label input { width: auto; }
.annual-objective-board { padding: 20px 22px; }
.annual-objective-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.annual-objective-cards article { display: grid; min-width: 0; gap: 6px; border: 1px solid var(--ds-border); border-radius: 12px; padding: 14px; }
.annual-objective-cards article > span, .annual-objective-cards article > small { color: var(--ds-text-muted); font-size: 9px; }
.annual-objective-cards article > strong { display: -webkit-box; overflow: hidden; color: var(--ds-text-secondary); font-size: 12px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.annual-objective-cards article > div { overflow: hidden; height: 5px; border-radius: 9px; background: var(--ds-border); }
.annual-objective-cards article > div i { display: block; height: 100%; border-radius: inherit; background: var(--ds-brand); }

.annual-empty-action { display: grid; min-height: 150px; place-content: center; gap: 7px; border: 1px dashed var(--ds-border-strong); border-radius: 12px; color: var(--ds-text-muted); padding: 20px; text-align: center; }
.annual-empty-action strong { color: var(--ds-text-secondary); font-size: 13px; }
.annual-empty-action span { font-size: 10px; line-height: 1.55; }
.annual-empty-action button { justify-self: center; margin-top: 4px; }

.annual-week-schedule-board { margin-bottom: 18px; padding: 22px; }
.annual-week-table { overflow-x: auto; margin-top: 18px; border: 1px solid var(--ds-border); border-radius: 13px; }
.annual-week-table-head, .annual-week-table-row { display: grid; min-width: 900px; grid-template-columns: 72px repeat(7, minmax(105px, 1fr)); }
.annual-week-table-head { background: var(--ds-surface-subtle); }
.annual-week-table-head > *, .annual-week-table-row > * { min-width: 0; border-right: 1px solid var(--ds-border); padding: 9px; }
.annual-week-table-head > *:last-child, .annual-week-table-row > *:last-child { border-right: 0; }
.annual-week-table-head span, .annual-week-table-head strong { color: var(--ds-text-muted); font-size: 10px; text-align: center; }
.annual-week-table-row { border-top: 1px solid var(--ds-border); }
.annual-week-table-row > strong { color: var(--ds-text-secondary); font-size: 10px; }
.annual-week-table-row > div { display: grid; align-content: start; gap: 5px; min-height: 62px; }
.annual-week-table-row article { position: relative; display: grid; gap: 2px; border-left: 3px solid var(--ds-brand); border-radius: 7px; background: var(--ds-brand-soft); padding: 7px; }
.annual-week-table-row article.life-health { border-color: var(--ds-success); background: var(--ds-success-soft); }
.annual-week-table-row article.finance-debt { border-color: var(--ds-brand); background: #f9f5ff; }
.annual-week-table-row article.learning { border-color: #1570ef; background: #eff8ff; }
.annual-week-table-row article.paused { opacity: .45; }
.annual-week-table-row article span { color: var(--ds-text-secondary); font-size: 9px; font-weight: 800; line-height: 1.35; }
.annual-week-table-row article small { color: var(--ds-text-muted); font-size: 7px; }
.annual-week-table-row article button { position: absolute; top: 2px; right: 2px; width: 20px; min-height: 20px; border: 0; background: transparent; padding: 0; box-shadow: none; }
.annual-weekly-plan-form { grid-template-columns: minmax(220px, 1fr) 100px 110px 150px auto auto; align-items: center; margin-top: 14px; }
.annual-week-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 11px; color: var(--ds-text-muted); font-size: 9px; }
.annual-week-legend span { display: flex; align-items: center; gap: 5px; }
.annual-week-legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--ds-brand); }
.annual-week-legend i.life-health { background: var(--ds-success); }
.annual-week-legend i.finance-debt { background: var(--ds-brand); }
.annual-week-legend i.learning { background: #1570ef; }
#page-annual .annual-workspace-rail { position: sticky; top: 24px; align-self: start; }

.annual-daily-workspace { display: grid; grid-template-columns: minmax(360px, .8fr) minmax(0, 1.2fr); gap: 18px; align-items: start; }
.annual-checkin-calendar, .annual-today-checklist { padding: 22px; }
.annual-checkin-week, .annual-checkin-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.annual-checkin-week { margin-bottom: 7px; color: var(--ds-text-faint); font-size: 9px; text-align: center; }
.annual-checkin-days > i { min-height: 56px; }
.annual-checkin-days > button { position: relative; display: grid; min-height: 56px; place-content: center; gap: 3px; border: 1px solid transparent; border-radius: 10px; background: #fff; color: var(--ds-text-secondary); padding: 4px; box-shadow: none; }
.annual-checkin-days > button:hover, .annual-checkin-days > button.selected { border-color: #8098f9; background: var(--ds-brand-soft); }
.annual-checkin-days button > span { font-size: 11px; }
.annual-checkin-days button > small, .annual-checkin-days button > b { font-size: 7px; }
.annual-checkin-days button.complete { border-color: #fecdca; background: #fff6f5; color: var(--ds-danger); }
.annual-checkin-days button.complete > b { border: 1px solid #f04438; border-radius: 50%; color: var(--ds-danger); padding: 3px; transform: rotate(-8deg); }
.annual-checkin-days button.partial { background: #fff7e8; color: var(--ds-warning); }
.annual-checkin-days button.overdue { background: #fff5f4; color: var(--ds-danger); }
.annual-checkin-days button.rest { color: var(--ds-text-faint); }
.annual-checkin-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 13px; color: var(--ds-text-muted); font-size: 9px; }
.annual-checkin-legend span { display: flex; align-items: center; gap: 5px; }
.annual-checkin-legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--ds-border-strong); }
.annual-checkin-legend i.complete { background: #f04438; }
.annual-checkin-legend i.partial { background: var(--ds-warning); }
.annual-checkin-legend i.overdue { background: #fda29b; }
.annual-today-checklist-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.annual-today-checklist-head h2 { margin: 4px 0; color: var(--ds-text); font-size: 21px; }
.annual-today-checklist-head p { margin: 0; color: var(--ds-text-muted); font-size: 10px; }
.annual-checkin-stamp { display: grid; min-width: 90px; min-height: 72px; place-content: center; border: 2px solid var(--ds-border-strong); border-radius: 50%; color: var(--ds-text-muted); text-align: center; transform: rotate(-4deg); }
.annual-checkin-stamp.complete { border-color: #f04438; color: var(--ds-danger); }
.annual-checkin-stamp.partial { border-color: var(--ds-warning); color: var(--ds-warning); }
.annual-checkin-stamp strong { font-size: 16px; }
.annual-checkin-stamp span { font-size: 8px; }
.annual-grouped-task-list { display: grid; gap: 14px; margin-top: 18px; }
.annual-grouped-task-list > section { display: grid; gap: 0; overflow: hidden; border: 1px solid var(--ds-border); border-radius: 12px; }
.annual-grouped-task-list section > header { display: flex; align-items: center; justify-content: space-between; background: var(--ds-surface-subtle); padding: 9px 12px; }
.annual-grouped-task-list section > header strong { color: var(--ds-text-secondary); font-size: 10px; }
.annual-grouped-task-list section > header span { color: var(--ds-text-muted); font-size: 9px; }
.annual-grouped-task-list article { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto 28px; align-items: center; gap: 9px; border-top: 1px solid var(--ds-border); padding: 10px 11px; }
.annual-grouped-task-list article.done { background: #f6fef9; }
.annual-grouped-task-list article.skipped { opacity: .58; }
.annual-task-check { display: grid; width: 28px; min-height: 28px; place-items: center; border: 1px solid var(--ds-border-strong); border-radius: 8px; background: #fff; color: var(--ds-success); padding: 0; }
.annual-grouped-task-list article.done .annual-task-check { border-color: #6ce9a6; background: var(--ds-success-soft); }
.annual-grouped-task-list article > div strong, .annual-grouped-task-list article > div small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.annual-grouped-task-list article > div strong { color: var(--ds-text-secondary); font-size: 11px; }
.annual-grouped-task-list article > div small { margin-top: 3px; color: var(--ds-text-faint); font-size: 8px; }
.annual-grouped-task-list article > span { border-radius: 999px; padding: 4px 7px; font-size: 8px; }
.annual-grouped-task-list article > span.required { background: var(--ds-danger-soft); color: var(--ds-danger); }
.annual-grouped-task-list article > span.optional { background: var(--ds-surface-muted); color: var(--ds-text-muted); }
.annual-task-more { width: 28px; min-height: 28px; border: 0; background: transparent; padding: 0; box-shadow: none; }
.annual-today-actions { display: flex; gap: 8px; margin-top: 14px; }
.annual-temporary-task-form { grid-template-columns: minmax(180px, 1fr) 150px auto auto; align-items: center; margin-top: 14px; }
.annual-daily-record-details { margin-top: 14px; border-top: 1px solid var(--ds-border); padding-top: 12px; }

.annual-review-periods { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 22px; }
.annual-review-periods h2 { margin: 4px 0; color: var(--ds-text); font-size: 21px; }
.annual-review-periods p { margin: 0; color: var(--ds-text-muted); font-size: 10px; }
.annual-review-periods nav { display: grid; grid-template-columns: repeat(6, 38px); gap: 5px; }
.annual-review-periods nav button { min-height: 30px; border-radius: 8px; padding: 4px; font-size: 9px; }
.annual-review-periods nav button.active { border-color: var(--ds-brand); background: var(--ds-brand-soft); color: var(--ds-brand-strong); }
.annual-review-periods nav button.completed::after { color: var(--ds-success); content: " ·"; }
.annual-auto-review-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(330px, .85fr); gap: 18px; }
.annual-review-stats-panel, .annual-ai-review-panel, .annual-year-auto-summary { padding: 20px 22px; }
.annual-review-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.annual-review-metrics article { display: grid; gap: 3px; border: 1px solid var(--ds-border); border-radius: 10px; background: #fcfcfd; padding: 11px; }
.annual-review-metrics span { color: var(--ds-text-muted); font-size: 9px; }
.annual-review-metrics strong { color: var(--ds-text-secondary); font-size: 17px; }
.annual-domain-rate-list { display: grid; gap: 9px; margin-top: 16px; }
.annual-domain-rate-list > div { display: grid; grid-template-columns: 100px minmax(0, 1fr) 42px; align-items: center; gap: 8px; }
.annual-domain-rate-list span, .annual-domain-rate-list strong { color: var(--ds-text-muted); font-size: 9px; }
.annual-domain-rate-list i { overflow: hidden; height: 6px; border-radius: 8px; background: var(--ds-border); }
.annual-domain-rate-list i b { display: block; height: 100%; background: var(--ds-brand); }
.annual-review-interruptions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.annual-review-interruptions > strong { width: 100%; color: var(--ds-text-secondary); font-size: 10px; }
.annual-review-interruptions > span { border-radius: 999px; background: #fff4ed; color: #b93815; padding: 5px 8px; font-size: 8px; }
.annual-ai-review-content { display: grid; gap: 9px; }
.annual-ai-review-content section { border-left: 3px solid #8098f9; border-radius: 8px; background: #f8f9ff; padding: 9px 11px; }
.annual-ai-review-content section strong { color: var(--ds-text-secondary); font-size: 10px; }
.annual-ai-review-content section p { margin: 4px 0 0; color: var(--ds-text-muted); font-size: 9px; line-height: 1.5; }
.annual-ai-review-content section.next-focus { border-color: var(--ds-success); background: #f6fef9; }
.annual-special-context { display: grid; gap: 5px; margin: 13px 0; color: var(--ds-text-secondary); font-size: 10px; }
.annual-ai-review-panel > button { width: 100%; }
.annual-year-auto-summary > div:last-of-type { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.annual-year-auto-summary article { display: grid; gap: 4px; border: 1px solid var(--ds-border); border-radius: 10px; padding: 12px; }
.annual-year-auto-summary article span { color: var(--ds-text-muted); font-size: 9px; }
.annual-year-auto-summary article strong { color: var(--ds-text-secondary); font-size: 19px; }
.annual-year-auto-summary > p { margin: 12px 0 0; color: var(--ds-text-muted); font-size: 10px; }

@media (max-width: 1180px) {
  .annual-year-calendar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .annual-daily-workspace, .annual-auto-review-grid { grid-template-columns: 1fr; }
  .annual-weekly-plan-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .annual-weekly-plan-form button { grid-column: span 3; }
}

@media (max-width: 820px) {
  #page-annual { padding-right: 16px; padding-left: 16px; }
  #page-annual .annual-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .annual-key-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .annual-phase-summary { grid-template-columns: 1fr; }
  .annual-phase-facts { border-top: 1px solid var(--ds-border); border-left: 0; padding-top: 12px; padding-left: 0; }
  .annual-year-calendar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .annual-month-calendar-layout { grid-template-columns: 1fr; }
  .annual-objective-cards { grid-template-columns: 1fr; }
  .annual-calendar-toolbar, .annual-review-periods { align-items: stretch; flex-direction: column; }
  .annual-review-periods nav { grid-template-columns: repeat(6, 1fr); }
  #page-annual .annual-workspace-rail { position: static; }
  .annual-year-auto-summary > div:last-of-type { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 540px) {
  #page-annual { padding-right: 12px; padding-left: 12px; }
  #page-annual .annual-page-heading { padding-top: 12px; padding-right: 0; }
  #page-annual .annual-page-heading .page-actions { position: static; margin-top: 12px; }
  #page-annual .annual-tabs { grid-template-columns: 1fr 1fr; gap: 8px; }
  #page-annual .annual-tabs button { min-height: 64px; padding: 9px; }
  #page-annual .annual-tabs small { display: none; }
  .annual-key-metrics { grid-template-columns: 1fr 1fr; }
  .annual-key-metrics article { min-height: 92px; padding: 13px; }
  .annual-year-calendar { grid-template-columns: 1fr; }
  .annual-calendar-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .annual-calendar-actions input { grid-column: span 2; width: 100%; }
  .annual-event-form { grid-template-columns: 1fr; }
  .annual-event-form > * { grid-column: auto !important; }
  .annual-weekly-plan-form, .annual-temporary-task-form { grid-template-columns: 1fr; }
  .annual-weekly-plan-form button { grid-column: auto; }
  .annual-checkin-calendar, .annual-today-checklist, .annual-calendar-board { padding: 16px; }
  .annual-checkin-days { gap: 3px; }
  .annual-checkin-days > i, .annual-checkin-days > button { min-height: 45px; }
  .annual-today-checklist-head { align-items: flex-start; flex-direction: column; }
  .annual-checkin-stamp { min-width: 78px; min-height: 62px; }
  .annual-grouped-task-list article { grid-template-columns: 28px minmax(0, 1fr) auto; }
  .annual-task-more { grid-column: 3; }
  .annual-today-actions { display: grid; grid-template-columns: 1fr; }
  .annual-review-periods nav { grid-template-columns: repeat(4, 1fr); }
  .annual-review-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .annual-year-auto-summary > div:last-of-type { grid-template-columns: 1fr 1fr; }
}

img,
svg,
canvas,
video,
iframe {
  max-width: 100%;
}

.page,
#page-home,
#page-annual {
  width: min(100%, var(--ds-content-max));
  max-width: var(--ds-content-max);
  padding-right: var(--ds-page-padding);
  padding-left: var(--ds-page-padding);
}

.page > *,
.panel,
.modal-panel,
.settings-content,
.home-overview > *,
.annual-content > * {
  min-width: 0;
}

.module-empty-state,
.inventory-empty-state,
.resource-empty-state,
.annual-empty-action,
.annual-daily-empty-board {
  min-height: clamp(132px, 18vw, 220px);
}

.home-profile-panel,
.daily-todo-panel,
.home-highlights-panel,
.home-calendar-panel,
.home-annual-panel {
  min-height: 0;
}

.home-execution-list,
#page-home .home-highlights-panel .highlight-list {
  max-height: none;
  overflow: visible;
}

#page-home .carousel-shell,
.home-overview > .carousel-shell {
  height: auto;
  min-height: clamp(190px, 31vw, 420px);
  aspect-ratio: var(--carousel-aspect, 18 / 7);
}

.execution-source-mark {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  color: var(--ds-text-faint);
  font-size: 18px;
}

.resource-card-actions:empty {
  display: none;
}

.inventory-table td {
  overflow-wrap: anywhere;
}

@media (max-width: 1024px) {
  :root { --page-gutter: 22px; }
  .page-heading,
  .page-heading-centered {
    grid-template-columns: minmax(0, 1fr) auto;
    justify-items: start;
    text-align: left;
  }
  .page-heading > .eyebrow,
  .page-heading > h2,
  .page-heading > .page-heading-note { grid-column: 1; }
  .page-actions { grid-column: 2; }
}

@media (max-width: 768px) {
  :root { --page-gutter: 16px; }
  .page-heading,
  .page-heading-centered {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .page-actions {
    grid-column: 1;
    grid-row: auto;
    justify-self: stretch;
    width: 100%;
  }
  .page-actions > *,
  .page-actions button { flex: 1 1 140px; }
  .resource-toolbar,
  .review-generator-grid,
  .settings-runtime-grid,
  .annual-key-metrics,
  .annual-review-metrics {
    grid-template-columns: 1fr;
  }
  .inventory-table,
  .annual-week-table-head,
  .annual-week-table-row {
    min-width: 760px;
  }
  .modal-actions,
  .button-row {
    flex-wrap: wrap;
  }
}

@media (max-width: 390px) {
  :root { --page-gutter: 12px; }
  .workspace-topbar { gap: 8px; padding: 9px 10px; }
  .workspace-tools { gap: 6px; }
  .workspace-avatar { display: none; }
  .panel,
  .home-command-bar,
  #page-home .panel,
  #page-home .home-profile-panel,
  .annual-checkin-calendar,
  .annual-today-checklist,
  .annual-calendar-board {
    padding: 14px;
  }
  .home-command-actions,
  .home-execution-date-tools,
  .annual-calendar-actions,
  .modal-actions,
  .button-row {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }
  .home-command-actions > *,
  .home-execution-date-tools > *,
  .annual-calendar-actions > *,
  .modal-actions > *,
  .button-row > * {
    width: 100%;
  }
  .home-progress-summary { grid-template-columns: 64px minmax(0, 1fr); }
  .home-progress-ring { width: 62px; height: 62px; }
  .daily-todo-item,
  .daily-todo-item.done { grid-template-columns: 28px minmax(0, 1fr) 24px; padding-right: 8px; padding-left: 8px; }
  .todo-item-copy > span { white-space: normal; }
  .annual-review-periods nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .annual-year-auto-summary > div:last-of-type { grid-template-columns: 1fr; }
}

html {
  min-width: 320px;
  background: var(--ds-bg);
  font-size: 16px;
  scroll-padding-top: 84px;
}

body {
  --ds-shell-sidebar-current: var(--ds-sidebar-width);
  min-width: 320px;
  min-height: 100%;
  overflow-x: clip;
  background: var(--ds-bg);
  color: var(--ds-text);
  font-size: var(--ds-font-size-body);
  line-height: var(--ds-line-height-body);
  -webkit-font-smoothing: antialiased;
}

body,
button,
input,
select,
textarea {
  font-family: var(--ds-font-sans);
}

a,
button,
.button-link,
summary,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

button,
.button-link {
  min-height: var(--ds-control-height);
  border: 1px solid var(--ds-border-strong);
  border-radius: var(--ds-control-radius);
  background: var(--ds-surface);
  color: var(--ds-text-secondary);
  padding: 8px 14px;
  font-size: var(--ds-font-size-body-sm);
  font-weight: 650;
  line-height: 1.25;
  box-shadow: none;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease, transform 150ms ease;
}

button:hover:not(:disabled),
.button-link:hover {
  border-color: var(--ds-border-hover);
  background: var(--ds-surface-subtle);
  color: var(--ds-text);
}

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

button.primary,
.button-link.primary {
  border-color: var(--ds-brand);
  background: var(--ds-brand);
  color: var(--ds-on-brand);
  box-shadow: var(--ds-shadow-button);
}

button.primary:hover:not(:disabled),
.button-link.primary:hover {
  border-color: var(--ds-brand-strong);
  background: var(--ds-brand-strong);
  color: var(--ds-on-brand);
}

button.danger,
.button-link.danger {
  border-color: var(--ds-danger-border);
  background: var(--ds-surface);
  color: var(--ds-danger);
  box-shadow: none;
}

button.danger:hover:not(:disabled),
.button-link.danger:hover {
  border-color: var(--ds-danger-border-strong);
  background: var(--ds-danger-soft);
  color: var(--ds-danger);
}

button:disabled,
.button-link[aria-disabled="true"],
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

:where(button, .button-link, a, input, textarea, select, summary, [role="button"]):focus-visible {
  outline: 3px solid var(--ds-focus-color);
  outline-offset: 2px;
}

input,
textarea,
select {
  width: 100%;
  max-width: 100%;
  min-height: var(--ds-control-height);
  border: 1px solid var(--ds-border-strong);
  border-radius: var(--ds-control-radius);
  background: var(--ds-surface);
  color: var(--ds-text);
  padding: 9px 12px;
  font-size: var(--ds-font-size-body);
  line-height: 1.4;
  box-shadow: none;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: var(--ds-placeholder);
}

input:hover:not(:disabled),
textarea:hover:not(:disabled),
select:hover:not(:disabled) {
  border-color: var(--ds-border-hover);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--ds-brand);
  box-shadow: var(--ds-focus-ring);
}

input[type="checkbox"],
input[type="radio"] {
  width: 20px;
  min-height: 20px;
  height: 20px;
  flex: 0 0 20px;
  padding: 0;
  accent-color: var(--ds-brand);
}

input[type="date"],
input[type="month"],
input[type="week"],
.native-date-input {
  min-width: 0;
  color-scheme: light;
  font-variant-numeric: tabular-nums;
}

label:has(> input),
label:has(> select),
label:has(> textarea),
label:has(> div > input),
label:has(> div > select),
label:has(> div > textarea) {
  position: relative;
  display: grid;
  gap: 7px;
  color: var(--ds-text-secondary);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}

.required-field-label {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  align-items: baseline;
  gap: 2px;
}

.required-field-label .required-indicator {
  color: var(--ds-danger);
  font-size: 1em;
  font-weight: 800;
  line-height: 1;
}

.inline-check,
.toggle-row,
label.inline-check,
label.toggle-row,
label:has(> input[type="checkbox"]),
label:has(> input[type="radio"]) {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 9px;
}

.form-error,
[role="alert"] {
  color: var(--ds-danger);
  font-size: 13px;
  line-height: 1.45;
}

.app-nav {
  width: var(--ds-sidebar-width);
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  gap: 14px;
  overflow-x: hidden;
  border-right: 1px solid var(--ds-border);
  background: var(--ds-surface);
  padding: 18px 12px 16px;
  box-shadow: none;
  transition: width 180ms ease, transform 180ms ease, padding 180ms ease;
}

.brand {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(145deg, #6d6eea, #4748c9);
  box-shadow: 0 6px 14px rgba(91, 92, 226, 0.2);
}

.brand > div:not(.brand-mark) {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.brand strong,
.brand span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand strong {
  font-size: 14px;
}

.brand span {
  font-size: 12px;
}

.nav-collapse-button {
  display: grid;
  width: 30px;
  min-height: 30px;
  height: 30px;
  place-items: center;
  border-color: var(--ds-border);
  border-radius: 9px;
  padding: 0;
  color: var(--ds-text-muted);
  font-size: 20px;
  line-height: 1;
}

.workspace-chip {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 9px;
  border: 1px solid #dfe3ff;
  border-radius: 11px;
  background: #f7f7ff;
  padding: 0 11px;
  font-size: 12px;
  font-weight: 650;
}

.global-jump {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  min-height: 40px;
  border: 1px solid var(--ds-border);
  border-radius: 11px;
  background: var(--ds-surface-subtle);
  padding: 0 9px;
  color: var(--ds-text-muted);
}

.global-jump > span {
  display: grid;
  place-items: center;
  font-size: 18px;
}

.global-jump input {
  min-height: 38px;
  border: 0;
  background: transparent;
  padding: 7px 4px;
  box-shadow: none;
  font-size: 13px;
}

.global-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 80;
  display: grid;
  width: min(420px, calc(100vw - 32px));
  max-height: min(60vh, 460px);
  gap: 4px;
  overflow-y: auto;
  border: 1px solid var(--ds-border);
  border-radius: 14px;
  background: var(--ds-surface);
  padding: 8px;
  box-shadow: 0 18px 40px rgba(16, 24, 40, 0.16);
}

.global-search-results > button {
  display: grid;
  height: auto;
  justify-items: start;
  gap: 2px;
  border-color: transparent;
  padding: 9px 10px;
  text-align: left;
}

.global-search-results > button span {
  color: var(--ds-text-muted);
  font-size: 12px;
}

.global-search-results > button strong {
  color: var(--ds-text);
  font-size: 13px;
}

.nav-list {
  gap: 13px;
}

.nav-section {
  gap: 4px;
}

.nav-section-label {
  display: flex;
  min-height: 28px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 8px 2px;
  border-radius: 7px;
  color: #7a8699;
  padding: 2px 0;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.07em;
  cursor: pointer;
}

.nav-section-label::after {
  color: var(--ds-text-faint);
  content: "⌄";
  font-size: 12px;
  transition: transform 150ms ease;
}

.nav-section.collapsed .nav-section-label::after {
  transform: rotate(-90deg);
}

.nav-section.collapsed .nav-btn {
  display: none;
}

.nav-btn {
  min-height: 42px;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0 9px;
  color: var(--ds-text-secondary);
  font-size: 13px;
  font-weight: 620;
}

.nav-btn:hover {
  border-color: #edf0f5;
  background: var(--ds-surface-subtle);
}

.nav-btn.active {
  border-color: #e1e3ff;
  background: var(--ds-brand-soft);
  color: var(--ds-brand-strong);
}

.nav-icon {
  width: 24px;
  height: 24px;
  flex-basis: 24px;
  border-radius: 8px;
  background: transparent;
}

.nav-btn.active .nav-icon {
  background: var(--ds-brand-soft-strong);
}

.nav-foot {
  display: grid;
  gap: 10px;
  border-color: var(--ds-border);
  border-radius: 12px;
  background: var(--ds-surface-subtle);
  padding: 11px;
}

.nav-foot > div:first-child {
  display: grid;
  gap: 2px;
}

.nav-foot strong {
  font-size: 13px;
}

.nav-foot span {
  font-size: 12px;
}

.nav-foot-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.nav-foot-actions button {
  min-height: 34px;
  padding: 5px 8px;
  font-size: 12px;
}

.app-main {
  width: auto;
  min-height: 100vh;
  min-height: 100dvh;
  min-width: 0;
  display: flex;
  flex-direction: column;
  margin-left: var(--ds-sidebar-width);
  background: var(--ds-bg);
  transition: margin-left 180ms ease;
}

.workspace-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: var(--ds-topbar-height);
  gap: 12px;
  border-bottom: 1px solid var(--ds-border);
  background: var(--ds-surface);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  padding-block: 10px;
  padding-inline: max(
    var(--ds-page-padding),
    calc((100vw - var(--ds-shell-sidebar-current) - var(--ds-content-max)) / 2 + var(--ds-page-padding))
  );
}

.workspace-heading {
  gap: 1px;
}

.workspace-heading-title {
  gap: 10px;
}

.workspace-heading-title > span,
.workspace-heading span,
.workspace-motivation {
  color: var(--ds-text-muted);
  font-size: 12px;
}

.workspace-heading strong {
  color: var(--ds-text);
  font-size: 17px;
  line-height: 1.3;
}

.workspace-tools {
  gap: 10px;
}

.workspace-avatar {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border-radius: 50%;
  background: var(--ds-brand-soft);
  color: var(--ds-brand-strong);
  font-size: 12px;
  font-weight: 750;
}

body.nav-collapsed .app-nav {
  width: var(--ds-sidebar-collapsed);
  padding-right: 10px;
  padding-left: 10px;
}

body.nav-collapsed .app-main {
  margin-left: var(--ds-sidebar-collapsed);
}

body.nav-collapsed {
  --ds-shell-sidebar-current: var(--ds-sidebar-collapsed);
}

body.nav-collapsed .brand {
  grid-template-columns: 1fr;
  justify-items: center;
}

body.nav-collapsed .brand > div:not(.brand-mark),
body.nav-collapsed .workspace-chip > span:last-child,
body.nav-collapsed .global-jump input,
body.nav-collapsed .nav-section-label,
body.nav-collapsed .nav-btn > span:last-child,
body.nav-collapsed .nav-foot {
  display: none;
}

body.nav-collapsed .brand-mark {
  width: 38px;
  height: 38px;
}

body.nav-collapsed .nav-collapse-button {
  position: absolute;
  top: 5px;
  right: -3px;
  width: 24px;
  min-height: 28px;
  height: 28px;
  background: var(--ds-surface);
  font-size: 18px;
}

body.nav-collapsed .workspace-chip,
body.nav-collapsed .global-jump,
body.nav-collapsed .nav-btn {
  width: 44px;
  min-height: 42px;
  justify-content: center;
  padding: 0;
}

body.nav-collapsed .global-jump {
  display: grid;
  grid-template-columns: 1fr;
}

body.nav-collapsed .nav-list {
  gap: 5px;
}

body.nav-collapsed .nav-section {
  gap: 4px;
}

.page,
#page-home,
#page-annual {
  width: min(100%, var(--ds-content-max));
  max-width: var(--ds-content-max);
  margin: 0 auto;
  padding: var(--ds-page-block-start) var(--ds-page-padding) var(--ds-page-block-end);
}

.app-main > .page.active {
  flex: 1 0 auto;
}

.page > *,
.page :where(.panel, article, section, form, table),
.home-overview > *,
.annual-content > * {
  min-width: 0;
}

.page-heading,
.page-heading-centered {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto auto;
  align-items: center;
  justify-items: start;
  gap: 3px 20px;
  min-height: 0;
  margin: 0 0 var(--ds-section-gap);
  text-align: left;
}

.page-heading > .eyebrow,
.page-heading > h2,
.page-heading > .page-heading-note,
.page-heading-centered > .eyebrow,
.page-heading-centered > h2,
.page-heading-centered > .page-heading-note {
  grid-column: 1;
}

.page-heading .eyebrow,
.page .eyebrow,
.module-section-kicker,
.annual-board-kicker,
[class$="-kicker"] {
  margin: 0;
  color: var(--ds-brand);
  font-size: var(--ds-font-size-meta);
  font-weight: 750;
  letter-spacing: 0.045em;
  line-height: 1.35;
}

.page-heading h2 {
  margin: 0;
  color: var(--ds-text);
  font-size: var(--ds-font-size-page-title);
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.18;
}

.page-heading-note {
  max-width: 760px;
  margin: 3px 0 0;
  color: var(--ds-text-muted);
  font-size: var(--ds-font-size-body-sm);
  line-height: var(--ds-line-height-body);
}

.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--ds-bg);
}

.page-actions {
  position: static;
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: center;
  justify-self: end;
  gap: 8px;
  margin: 0;
  transform: none;
}

.panel,
.home-overview > .panel,
.home-profile-panel,
.kb-layout,
.exam-paper,
.review-paper,
.annual-section,
.learning-plan-overview,
.automation-hero,
.automation-panel {
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-card-radius);
  background: var(--ds-surface);
  box-shadow: var(--admin-shadow);
}

.panel,
.home-overview > .panel,
#page-home .panel,
#page-home .home-profile-panel,
.annual-checkin-calendar,
.annual-today-checklist,
.annual-calendar-board {
  padding: var(--ds-card-padding);
}

.panel:hover,
.home-overview > .panel:hover {
  border-color: var(--ds-border-strong);
}

.panel-head {
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.panel-head h2,
.panel-head h3,
.page .module-section-title {
  margin: 0;
  color: var(--ds-text);
  font-size: var(--ds-font-size-section-title);
  font-weight: 720;
  letter-spacing: -0.018em;
  line-height: 1.3;
}

.panel-head span,
.panel-head p,
.page small,
.page .muted {
  color: var(--ds-text-muted);
  font-size: var(--ds-font-size-meta);
  line-height: 1.5;
}

.page p,
.page li,
.page td,
.page input,
.page textarea,
.page select,
.page button {
  font-size: max(var(--ds-font-size-body-sm), 0.875rem);
}

.page button {
  font-size: max(14px, 1em) !important;
}

.page small,
.page .muted,
.page [class*="-meta"],
.page [class*="-label"],
#page-home [class*="-legend"],
.page summary,
#page-home .home-overview span {
  font-size: max(var(--ds-font-size-meta), 0.8125rem) !important;
}

.metric-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--ds-card-gap);
}

.metric {
  min-height: 104px;
  border: 1px solid var(--ds-border);
  border-radius: 14px;
  background: var(--ds-surface);
  padding: 18px;
  box-shadow: none;
}

.metric strong,
[class*="metric"] > strong,
[class*="-stat"] > strong {
  color: var(--ds-text);
  font-size: clamp(22px, 2vw, 28px);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.learning-plan-overview,
.home-command-bar,
.module-hero:not(.dark),
.main-overview-card {
  border-color: var(--ds-brand-border);
  background: var(--ds-surface);
  box-shadow: inset 3px 0 0 var(--ds-brand);
}

.table-toolbar {
  gap: 10px;
  border: 1px solid var(--ds-border);
  border-radius: 12px;
  background: var(--ds-surface-subtle);
  padding: 10px;
}

#page-inventory .inventory-toolbar.table-toolbar {
  gap: 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

table {
  width: 100%;
  border-collapse: collapse;
  color: var(--ds-text-secondary);
  font-size: var(--ds-font-size-body-sm);
  line-height: 1.45;
}

th {
  color: var(--ds-text-secondary);
  font-size: var(--ds-font-size-body-sm);
  font-weight: 700;
  text-align: left;
}

th,
td {
  border-color: var(--ds-border);
  padding: 11px 12px;
  vertical-align: top;
}

.inventory-table-wrap,
.annual-edit-table-wrap {
  max-width: 100%;
  border-color: var(--ds-border);
  border-radius: 14px;
}

.inventory-table,
.annual-edit-table,
.responsive-table {
  min-width: 0;
}

.empty-state {
  display: grid;
  min-height: 156px;
  align-content: center;
  justify-items: center;
  gap: 8px;
  border: 1px dashed var(--ds-border-strong);
  border-radius: 14px;
  background: var(--ds-surface-subtle);
  padding: 28px 20px;
  color: var(--ds-text-muted);
  text-align: center;
}

.empty-state strong {
  color: var(--ds-text);
  font-size: 16px;
  line-height: 1.4;
}

.empty-state > span,
.empty-state > p {
  max-width: 520px;
  margin: 0;
  color: var(--ds-text-muted);
  font-size: var(--ds-font-size-body-sm);
  line-height: 1.55;
}

.empty-state[data-empty-kind]::before {
  display: inline-flex;
  justify-self: center;
  border-radius: 999px;
  background: var(--ds-surface-muted);
  color: var(--ds-text-muted);
  padding: 4px 9px;
  font-size: var(--ds-font-size-meta);
  font-weight: 700;
  content: "空状态";
}

.empty-state[data-empty-kind="module"]::before { content: "模块为空"; }
.empty-state[data-empty-kind="category"]::before { content: "分类为空"; }
.empty-state[data-empty-kind="archive"]::before { content: "档案为空"; }
.empty-state[data-empty-kind="search"]::before { content: "搜索无结果"; }
.empty-state[data-empty-kind="config"]::before {
  background: var(--ds-warning-soft);
  color: var(--ds-warning);
  content: "尚未配置";
}
.empty-state[data-empty-kind="error"]::before {
  background: var(--ds-danger-soft);
  color: var(--ds-danger);
  content: "加载失败";
}

.table-empty-state {
  margin: 12px 0;
}

.stock-status,
.status-badge,
.annual-status-badge,
.risk-badge,
[class*="status-chip"] {
  font-size: var(--ds-font-size-meta);
  font-weight: 700;
}

.stock-status.normal,
.status-success,
.annual-status-badge.good {
  background: var(--ds-success-soft);
  color: var(--ds-success);
}

.stock-status.low,
.stock-status.expiring,
.status-warning,
.annual-status-badge.waiting {
  background: var(--ds-warning-soft);
  color: var(--ds-warning);
}

.stock-status.empty,
.status-danger,
.status-error {
  background: var(--ds-danger-soft);
  color: var(--ds-danger);
}

.modal {
  z-index: 100;
  padding: 24px;
}

.modal-panel {
  width: min(720px, calc(100vw - 48px));
  max-width: 100%;
  max-height: min(88dvh, 860px);
  overflow: hidden;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-modal);
  background: var(--ds-surface);
  box-shadow: var(--ds-shadow-modal);
}

.modal-head,
.modal-body,
.modal-actions {
  padding-right: 24px;
  padding-left: 24px;
}

.modal-head {
  min-height: 68px;
  border-bottom: 1px solid var(--ds-border);
  padding-top: 16px;
  padding-bottom: 16px;
}

.modal-head h2 {
  font-size: 20px;
  line-height: 1.3;
}

.modal-body {
  overflow-y: auto;
  padding-top: 20px;
  padding-bottom: 20px;
}

.modal-actions {
  gap: 9px;
  border-top: 1px solid var(--ds-border);
  background: var(--ds-surface-subtle);
  padding-top: 14px;
  padding-bottom: 14px;
}

.privacy-blurred,
[data-privacy="blurred"] img {
  filter: blur(12px);
}

@media (max-width: 1180px) and (min-width: 1025px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  :root {
    --ds-page-padding: 24px;
    --ds-page-block-start: 24px;
    --ds-page-block-end: 48px;
  }

  .app-nav,
  body.nav-collapsed .app-nav {
    width: min(320px, calc(100vw - 32px));
    gap: 14px;
    overflow-x: hidden;
    padding: 18px 14px 16px;
    transform: translateX(-105%);
    box-shadow: 18px 0 44px rgba(16, 24, 40, 0.17);
  }

  body.nav-open .app-nav,
  body.nav-collapsed.nav-open .app-nav {
    transform: translateX(0);
  }

  .app-main,
  body.nav-collapsed .app-main {
    width: 100%;
    margin-left: 0;
  }

  .mobile-nav-toggle {
    display: inline-grid;
    min-height: 42px;
    place-items: center;
  }

  .nav-collapse-button,
  body.nav-collapsed .nav-collapse-button {
    display: none;
  }

  body.nav-collapsed .brand {
    grid-template-columns: 40px minmax(0, 1fr);
    justify-items: stretch;
  }

  body.nav-collapsed .brand > div:not(.brand-mark),
  body.nav-collapsed .workspace-chip > span:last-child,
  body.nav-collapsed .global-jump input,
  body.nav-collapsed .nav-section-label,
  body.nav-collapsed .nav-btn > span:last-child,
  body.nav-collapsed .nav-foot {
    display: initial;
  }

  body.nav-collapsed .brand > div:not(.brand-mark),
  body.nav-collapsed .nav-foot {
    display: grid;
  }

  body.nav-collapsed .workspace-chip,
  body.nav-collapsed .global-jump,
  body.nav-collapsed .nav-btn {
    width: 100%;
    justify-content: flex-start;
    padding-right: 9px;
    padding-left: 9px;
  }

  body.nav-collapsed .global-jump {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  body.nav-collapsed .nav-list {
    gap: 13px;
  }

  .workspace-topbar {
    padding-right: 24px;
    padding-left: 24px;
  }

  .page-heading,
  .page-heading-centered {
    grid-template-columns: minmax(0, 1fr) auto;
  }

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

@media (max-width: 768px) {
  :root {
    --ds-page-padding: 16px;
    --ds-page-block-start: 20px;
    --ds-page-block-end: max(40px, calc(24px + env(safe-area-inset-bottom)));
    --ds-section-gap: 16px;
    --ds-card-gap: 14px;
    --ds-card-padding: 16px;
    --ds-card-radius: 14px;
    --ds-control-height: 44px;
  }

  .workspace-topbar {
    min-height: 64px;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 12px;
    padding: 9px max(16px, env(safe-area-inset-right)) 9px max(16px, env(safe-area-inset-left));
  }

  .workspace-heading-title > span,
  .workspace-motivation,
  .workspace-tools > span:first-child {
    display: none;
  }

  .workspace-heading strong {
    display: block;
    overflow: hidden;
    font-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .workspace-heading,
  .workspace-heading-title,
  .workspace-tools {
    min-width: 0;
  }

  .workspace-tools .workspace-avatar {
    display: none;
  }

  .page,
  #page-home,
  #page-annual {
    padding: var(--ds-page-block-start) var(--ds-page-padding) var(--ds-page-block-end);
  }

  .page-heading,
  .page-heading-centered {
    grid-template-columns: 1fr;
    gap: 4px;
    margin-bottom: 16px;
  }

  .page-heading h2 {
    font-size: 28px;
  }

  .page-actions {
    grid-column: 1;
    grid-row: auto;
    justify-self: stretch;
    width: 100%;
    margin-top: 10px;
  }

  .page-actions > *,
  .page-actions button {
    flex: 1 1 140px;
  }

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

  .panel,
  .home-overview > .panel,
  #page-home .panel,
  #page-home .home-profile-panel,
  .annual-checkin-calendar,
  .annual-today-checklist,
  .annual-calendar-board {
    padding: var(--ds-card-padding);
  }

  #page-home .panel,
  #page-home .home-profile-panel,
  #page-home .carousel-shell,
  #page-home .home-command-bar {
    border-radius: 14px;
  }

  .responsive-table,
  .inventory-table,
  .annual-edit-table {
    display: block;
    width: 100%;
    min-width: 0;
    border: 0;
  }

  .responsive-table thead,
  .inventory-table thead,
  .annual-edit-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .responsive-table tbody,
  .inventory-table tbody,
  .annual-edit-table tbody {
    display: grid;
    gap: 12px;
  }

  .responsive-table tr,
  .inventory-table tr,
  .annual-edit-table tr {
    display: grid;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--ds-border);
    border-radius: 13px;
    background: var(--ds-surface);
  }

  .responsive-table td,
  .inventory-table td,
  .annual-edit-table td {
    display: grid;
    grid-template-columns: minmax(88px, 34%) minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    min-width: 0;
    border: 0;
    border-bottom: 1px solid #edf0f5;
    padding: 11px 12px;
    overflow-wrap: anywhere;
  }

  .responsive-table td:last-child,
  .inventory-table td:last-child,
  .annual-edit-table td:last-child {
    border-bottom: 0;
  }

  .responsive-table td::before,
  .inventory-table td::before,
  .annual-edit-table td::before {
    color: var(--ds-text-muted);
    content: attr(data-label);
    font-size: 12px;
    font-weight: 700;
  }

  .inventory-table-wrap,
  .annual-edit-table-wrap {
    overflow: visible;
    border: 0;
    border-radius: 0;
  }

  .inventory-table input,
  .inventory-table select {
    min-height: 40px;
    border-color: var(--ds-border-strong);
    background: var(--ds-surface);
  }

  .annual-week-table-head {
    display: none;
  }

  .annual-week-table-row {
    min-width: 0;
    grid-template-columns: 1fr;
  }

  .inventory-pagination {
    align-items: stretch;
    flex-direction: column;
    border: 1px solid var(--ds-border);
    border-radius: 12px;
    margin-top: 12px;
  }

  .inventory-pagination-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .modal {
    align-items: flex-end;
    padding: 16px;
  }

  .modal-panel {
    width: 100%;
    max-height: calc(100dvh - 32px);
    border-radius: 16px;
  }

  .modal-head,
  .modal-body,
  .modal-actions {
    padding-right: 16px;
    padding-left: 16px;
  }

  .modal-actions,
  .button-row {
    flex-wrap: wrap;
  }
}

@media (max-width: 540px) {
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .workspace-tools {
    gap: 6px;
  }

  .workspace-avatar {
    display: none;
  }

  .page-actions,
  .button-row,
  .modal-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .page-actions > *,
  .button-row > *,
  .modal-actions > * {
    width: 100%;
  }
}

@media (max-width: 390px) {
  :root {
    --ds-page-padding: 14px;
  }

  .workspace-topbar {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 9px;
    padding-right: max(12px, env(safe-area-inset-right));
    padding-left: max(12px, env(safe-area-inset-left));
  }

  .responsive-table td,
  .inventory-table td,
  .annual-edit-table td {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}

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

/* Final type guardrails: readable body copy with a distinct, restrained metadata tier. */
.page p,
.page li,
.page dd,
.page td {
  font-size: max(var(--ds-font-size-body), 0.9375rem) !important;
}

.page label,
.page input,
.page textarea,
.page select,
.page button {
  font-size: max(var(--ds-font-size-body-sm), 0.875rem) !important;
}

.page small,
.page .muted,
.page [class*="-meta"],
.page [class*="-helper"],
.page [class*="-caption"],
.page [class*="-note"] {
  font-size: max(var(--ds-font-size-meta), 0.8125rem) !important;
}

.practice-recent-item strong,
.review-queue-list strong,
.annual-date-event-list strong,
.annual-week-table-row > strong,
.annual-grouped-task-list strong,
.annual-review-interruptions > strong,
.annual-ai-review-content strong,
.home-reminder-item strong,
.todo-item-copy strong,
.highlight-copy strong,
.home-empty-state strong {
  font-size: var(--ds-font-size-meta) !important;
}

.annual-mini-week,
.review-score-card div {
  font-size: var(--ds-font-size-meta) !important;
}

#page-home .panel,
#page-home .home-profile-panel,
#page-home .carousel-shell,
#page-home .home-command-bar {
  border-radius: var(--ds-card-radius);
}

@media (max-width: 768px) {
  #page-home .panel,
  #page-home .home-profile-panel,
  #page-home .carousel-shell,
  #page-home .home-command-bar {
    border-radius: 14px;
  }
}

/* Keep dashboard v4 above the legacy home-workspace cascade. */
#page-home .home-overview {
  display: block;
}

#page-home .home-highlights-panel {
  display: block !important;
}

/* Annual execution v16: calendar, stages, bill dates and snapshot-based review. */
.annual-stage-board {
  padding: var(--ds-card-padding);
}

.annual-stage-board .annual-phase-timeline {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.annual-stage-board .annual-phase-step {
  min-height: 190px;
  align-content: start;
  gap: 10px;
  border-color: var(--ds-border);
  border-radius: 14px;
  background: #fff;
  padding: 16px;
}

.annual-stage-board .annual-phase-step::before {
  display: none;
}

.annual-stage-board .annual-phase-step.active {
  border-color: #a4bcfd;
  background: var(--ds-brand-soft);
  box-shadow: 0 10px 24px rgba(68, 76, 231, 0.08);
}

.annual-stage-board .annual-phase-step.overdue {
  border-color: #fecdca;
}

.annual-stage-board .annual-phase-step > div {
  padding-left: 0;
}

.annual-phase-step-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.annual-phase-step-status > strong {
  color: var(--ds-brand-strong);
  font-size: 18px;
}

.annual-stage-board .annual-phase-step p {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ds-text-muted);
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.annual-stage-board .annual-goal-progress > div {
  background: linear-gradient(90deg, var(--ds-brand), var(--ds-brand));
}

.annual-status-badge.planned { background: var(--ds-surface-muted); color: var(--ds-text-secondary); }
.annual-status-badge.doing { background: var(--ds-brand-soft); color: var(--ds-brand-strong); }
.annual-status-badge.completed { background: var(--ds-success-soft); color: var(--ds-success); }
.annual-status-badge.overdue { background: var(--ds-danger-soft); color: var(--ds-danger); }

.annual-calendar-actions label,
.annual-calendar-filters label,
.annual-event-form > label,
.annual-weekly-plan-form > label,
.annual-temporary-task-form > label {
  display: grid;
  align-items: stretch;
  gap: 6px;
  color: var(--ds-text-muted);
  font-weight: 700;
}

.annual-calendar-actions label {
  min-width: 170px;
}

.annual-calendar-actions input {
  width: 100%;
}

.annual-calendar-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  margin-top: 16px;
  border-radius: 12px;
  background: #f8f9fc;
  padding: 12px;
}

.annual-calendar-filters label {
  min-width: 180px;
}

.annual-calendar-filters button {
  margin-left: auto;
}

.annual-year-calendar .annual-mini-days > button {
  min-height: 28px;
}

.annual-mini-days > button.drag-over {
  border-color: var(--ds-brand);
  background: var(--ds-brand-soft-strong);
  box-shadow: 0 0 0 3px rgba(97, 114, 243, 0.15);
}

.annual-date-event-list article[draggable="true"] {
  cursor: grab;
}

.annual-date-event-list article.dragging {
  opacity: 0.5;
}

.annual-reschedule-field {
  display: grid;
  grid-template-columns: auto minmax(130px, 1fr);
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  color: var(--ds-text-muted);
}

.annual-reschedule-field input {
  min-height: 36px;
}

.annual-create-details {
  border-top: 1px solid var(--ds-border);
  padding-top: 12px;
}

.annual-create-details summary {
  color: var(--ds-brand-strong);
  cursor: pointer;
  font-weight: 750;
}

.annual-event-form {
  grid-template-columns: minmax(0, 1fr) minmax(145px, 0.7fr);
  border-top: 0;
  margin-top: 12px;
}

.annual-event-form > label:nth-child(3),
.annual-event-form > button {
  grid-column: 1 / -1;
}

.annual-event-form > label.inline-check,
.annual-weekly-plan-form > label.inline-check,
.annual-temporary-task-form > label.inline-check {
  display: flex;
  align-items: center;
  align-self: end;
  min-height: 42px;
}

.annual-event-form > label.inline-check input,
.annual-weekly-plan-form > label.inline-check input,
.annual-temporary-task-form > label.inline-check input {
  width: auto;
}

.annual-weekly-plan-form {
  align-items: end;
}

.annual-weekly-create-details {
  margin-top: 14px;
}

.annual-weekly-plan-form > label > input,
.annual-weekly-plan-form > label > select,
.annual-temporary-task-form > label > input,
.annual-temporary-task-form > label > select {
  width: 100%;
}

.annual-finance-bill-board {
  margin-top: 16px;
}

.annual-bill-month-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.annual-bill-month-nav button {
  width: 36px;
  min-height: 36px;
  padding: 0;
}

.annual-bill-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1.2fr);
  gap: 16px;
}

.annual-bill-calendar {
  border: 1px solid var(--ds-border);
  border-radius: 13px;
  padding: 12px;
}

.annual-bill-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.annual-bill-days > i,
.annual-bill-days > span {
  display: grid;
  min-width: 0;
  min-height: 45px;
  place-content: center;
  gap: 2px;
  border: 1px solid transparent;
  border-radius: 9px;
  text-align: center;
}

.annual-bill-days > span.pending { background: #fff7e8; color: var(--ds-warning); }
.annual-bill-days > span.overdue { border-color: #fda29b; background: #fff5f4; color: var(--ds-danger); }
.annual-bill-days > span.completed { background: var(--ds-success-soft); color: var(--ds-success); }

.annual-bill-list {
  display: grid;
  align-content: start;
  gap: 8px;
}

.annual-bill-list > article {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--ds-border);
  border-left: 3px solid var(--ds-warning);
  border-radius: 11px;
  padding: 11px 12px;
}

.annual-bill-list > article.overdue { border-left-color: var(--ds-danger); }
.annual-bill-list > article.completed { border-left-color: var(--ds-success); }
.annual-bill-list > article div { display: grid; gap: 3px; min-width: 0; }
.annual-bill-list > article b { color: var(--ds-warning); }
.annual-bill-list > article.overdue b { color: var(--ds-danger); }
.annual-bill-list > article.completed b { color: var(--ds-success); }

.annual-saving-step-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  color: var(--ds-text-muted);
}

.annual-saving-step-status strong { color: var(--ds-text-secondary); }

#page-domain-plan .annual-saving-panel {
  display: grid;
  gap: 16px;
}

#page-domain-plan .annual-saving-panel > .panel-head {
  align-items: flex-start;
  border-bottom: 1px solid var(--ds-border);
  padding-bottom: 14px;
}

#page-domain-plan .annual-debt-compact-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--ds-text-muted);
  font-size: 12px;
  font-weight: 750;
}

#page-domain-plan .annual-debt-compact-summary span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  gap: 4px;
  border: 1px solid var(--ds-border);
  border-radius: 999px;
  background: var(--ds-surface-subtle);
  padding: 6px 11px;
  line-height: 1;
}

#page-domain-plan .annual-debt-compact-summary strong {
  color: var(--ds-text);
  font-size: 15px;
  line-height: 1;
}

#page-domain-plan .annual-saving-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

#page-domain-plan .annual-saving-grid > .empty-state {
  grid-column: 1 / -1;
}

#page-domain-plan .annual-saving-task {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 12px;
  border-color: var(--ds-border);
  border-radius: 14px;
  padding: 14px;
  box-shadow: none;
}

#page-domain-plan .annual-saving-task.is-editing {
  grid-column: 1 / -1;
  border-color: var(--ds-brand-border);
  background: #fbfcff;
}

#page-domain-plan .annual-saving-task-head {
  align-items: flex-start;
}

#page-domain-plan .annual-saving-task-head > div:first-child {
  min-width: 0;
}

#page-domain-plan .annual-saving-task-head span,
#page-domain-plan .annual-saving-task-head small {
  color: var(--ds-text-muted);
  font-size: 11px;
  line-height: 1.45;
}

#page-domain-plan .annual-saving-task-head h3 {
  overflow: hidden;
  margin: 4px 0 2px;
  color: var(--ds-text);
  font-size: 15px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-domain-plan .annual-saving-task.is-editing .annual-saving-task-head h3 {
  white-space: normal;
}

#page-domain-plan .annual-saving-task .annual-task-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#page-domain-plan .annual-saving-task .annual-task-actions button,
#page-domain-plan .annual-saving-task .annual-inline-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 58px;
  min-height: 34px;
  height: 34px;
  border-radius: 9px;
  padding: 0 12px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

#page-domain-plan .annual-saving-task .annual-inline-edit {
  color: var(--ds-brand-strong);
}

#page-domain-plan .annual-saving-task button.danger {
  border-color: var(--ds-danger-border);
  background: var(--ds-surface);
  color: var(--ds-danger);
}

#page-domain-plan .annual-saving-ring-row {
  display: grid;
  justify-items: center;
}

#page-domain-plan .annual-saving-ring {
  display: grid;
  width: clamp(96px, 7vw, 118px);
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--ds-brand) var(--saving-progress), var(--ds-border) 0);
}

#page-domain-plan .annual-saving-ring::before {
  content: "";
  grid-area: 1 / 1;
  width: calc(100% - 12px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--ds-surface);
}

#page-domain-plan .annual-saving-task.is-editing .annual-saving-ring::before {
  background: #fbfcff;
}

#page-domain-plan .annual-saving-ring > div {
  z-index: 1;
  display: grid;
  grid-area: 1 / 1;
  justify-items: center;
  gap: 2px;
}

#page-domain-plan .annual-saving-ring strong {
  color: var(--ds-text);
  font-size: 22px;
  line-height: 1;
}

#page-domain-plan .annual-saving-ring small {
  color: var(--ds-text-muted);
  font-size: 11px;
}

#page-domain-plan .annual-saving-ring span {
  color: var(--ds-text-muted);
  font-size: 11px;
}

#page-domain-plan .annual-saving-card-money {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

#page-domain-plan .annual-saving-card-money span {
  display: grid;
  gap: 2px;
  min-width: 0;
  border-radius: 10px;
  background: var(--ds-surface-subtle);
  padding: 8px;
  color: var(--ds-text-muted);
  font-size: 11px;
}

#page-domain-plan .annual-saving-card-money strong {
  overflow: hidden;
  color: var(--ds-text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-domain-plan .annual-saving-card-status,
#page-domain-plan .annual-saving-step-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  color: var(--ds-text-muted);
  font-size: 12px;
}

#page-domain-plan .annual-saving-card-status b {
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--ds-brand-strong);
  background: var(--ds-brand-soft);
}

#page-domain-plan .annual-saving-card-status b.completed {
  color: var(--ds-success);
  background: var(--ds-success-soft);
}

#page-domain-plan .annual-saving-step-summary {
  display: grid;
  justify-content: stretch;
  border-top: 1px solid var(--ds-border);
  padding-top: 10px;
}

#page-domain-plan .annual-saving-step-summary span,
#page-domain-plan .annual-saving-step-summary small {
  color: var(--ds-text-muted);
  font-size: 11px;
}

#page-domain-plan .annual-saving-step-summary strong {
  overflow: hidden;
  color: var(--ds-text-secondary);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-domain-plan .annual-saving-task.is-editing .annual-saving-editor {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-color: var(--ds-border);
  background: var(--ds-surface);
}

#page-domain-plan .annual-saving-controls {
  display: grid;
  grid-template-columns: minmax(160px, 240px) auto;
  align-items: end;
  justify-content: start;
  gap: 12px;
}

#page-domain-plan .annual-saving-controls label:not(.inline-check) {
  align-self: stretch;
}

#page-domain-plan .annual-saving-controls input[type="number"] {
  width: 100%;
  max-width: none;
}

#page-domain-plan .annual-saving-controls .inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--ds-control-height);
  margin: 0;
  color: var(--ds-text-secondary);
  font-size: 13px;
  font-weight: 750;
  line-height: 1;
}

#page-domain-plan .annual-saving-controls .inline-check input {
  width: 20px;
  height: 20px;
  min-height: 20px;
  margin: 0;
}

#page-domain-plan .annual-saving-auto-editor {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(150px, .6fr));
  align-items: end;
  gap: 10px;
  margin: 2px 0 0;
  border: 1px solid var(--ds-border);
  border-radius: 12px;
  background: var(--ds-surface-subtle);
  padding: 12px;
}

#page-domain-plan .annual-saving-auto-editor legend {
  padding-inline: 4px;
  color: var(--ds-brand-strong);
  font-size: 12px;
  font-weight: 800;
}

#page-domain-plan .annual-saving-auto-editor .inline-check {
  display: flex;
  align-items: center;
  min-height: 40px;
}

#page-domain-plan .annual-saving-auto-editor > small {
  grid-column: 1 / -1;
  color: var(--ds-text-muted);
  font-size: 12px;
  line-height: 1.45;
}

#page-domain-plan .annual-saving-auto-status {
  display: grid;
  gap: 3px;
  border: 1px solid #d9d6fe;
  border-radius: 11px;
  background: var(--ds-brand-soft);
  padding: 9px 10px;
}

#page-domain-plan .annual-saving-auto-status span {
  color: var(--ds-brand-strong);
  font-size: 11px;
  font-weight: 800;
}

#page-domain-plan .annual-saving-auto-status strong {
  color: var(--ds-text);
  font-size: 13px;
}

#page-domain-plan .annual-saving-auto-status small {
  color: var(--ds-text-muted);
  font-size: 11px;
}

#page-domain-plan .annual-saving-task.is-editing .annual-saving-steps {
  border-top-color: var(--ds-border);
}

@media (max-width: 1180px) {
  #page-domain-plan .annual-saving-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  #page-domain-plan .annual-saving-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #page-domain-plan .annual-saving-task.is-editing .annual-saving-editor {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #page-domain-plan .annual-saving-auto-editor {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  #page-domain-plan .annual-saving-panel > .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  #page-domain-plan .annual-saving-panel > .panel-head .annual-task-actions {
    justify-content: flex-start;
  }

  #page-domain-plan .annual-saving-grid,
  #page-domain-plan .annual-saving-task.is-editing .annual-saving-editor,
  #page-domain-plan .annual-saving-auto-editor,
  #page-domain-plan .annual-saving-controls,
  #page-domain-plan .annual-saving-card-money {
    grid-template-columns: 1fr;
  }
}

.annual-review-radar-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.annual-review-radar-grid > article {
  display: grid;
  min-width: 0;
  justify-items: center;
  border: 1px solid var(--ds-border);
  border-radius: 13px;
  padding: 12px;
}

.annual-review-radar-grid > article > div {
  display: grid;
  justify-self: stretch;
  gap: 2px;
}

.annual-review-radar-grid .annual-radar {
  width: min(100%, 230px);
}

.annual-radar.user .annual-radar-area { fill: rgba(127, 86, 217, 0.16); stroke: var(--ds-brand); }
.annual-radar.user circle { fill: var(--ds-brand); }

.annual-self-score-details {
  margin-top: 12px;
  border: 1px solid var(--ds-border);
  border-radius: 12px;
  padding: 11px 12px;
}

.annual-self-score-details summary { cursor: pointer; font-weight: 750; }
.annual-self-score-details > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.annual-self-score-details label { display: grid; gap: 5px; }
.annual-self-score-details p { margin: 8px 0 0; color: var(--ds-text-muted); }

.annual-ai-review-panel > button + button {
  width: 100%;
  margin-top: 8px;
}

.annual-review-draft-card {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  border: 1px solid #d9d6fe;
  border-radius: 12px;
  background: #f9f5ff;
  padding: 12px;
}

.annual-review-draft-card > span { color: #6941c6; }
.annual-review-draft-card p { margin: 0; color: var(--ds-text-muted); }

.annual-year-auto-summary .annual-year-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.annual-year-trend {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  border-top: 1px solid var(--ds-border);
  padding-top: 16px;
}

.annual-year-trend > div:first-child { display: flex; justify-content: space-between; gap: 12px; }
.annual-year-trend > div:last-child { display: grid; height: 170px; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: end; gap: 6px; }
.annual-year-trend article { display: grid; height: 100%; grid-template-rows: minmax(0, 1fr) auto auto; align-items: end; gap: 4px; border: 0; padding: 0; text-align: center; }
.annual-year-trend article i { display: block; width: 70%; justify-self: center; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, var(--ds-brand), var(--ds-brand)); }
.annual-year-trend article span,
.annual-year-trend article b { color: var(--ds-text-muted); }

.annual-review-history {
  padding: var(--ds-card-padding);
}

.annual-review-history > div:last-child {
  display: grid;
  gap: 8px;
}

.annual-review-history > div:last-child > article {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--ds-border);
  border-radius: 11px;
  padding: 11px 12px;
}

.annual-review-history article div { display: grid; gap: 3px; min-width: 0; }
.annual-review-history article b { border-radius: 999px; background: var(--ds-surface-muted); color: var(--ds-text-secondary); padding: 4px 8px; }

@media (max-width: 1180px) {
  .annual-stage-board .annual-phase-timeline { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .annual-year-auto-summary .annual-year-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .annual-stage-board .annual-phase-timeline,
  .annual-bill-layout,
  .annual-review-radar-grid { grid-template-columns: 1fr; }

  .annual-calendar-filters { display: grid; grid-template-columns: 1fr 1fr; }
  .annual-calendar-filters label { min-width: 0; }
  .annual-calendar-filters button { grid-column: 1 / -1; width: 100%; margin-left: 0; }

  .annual-week-table { overflow: visible; border: 0; }
  .annual-week-table-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; border: 0; margin-bottom: 12px; }
  .annual-week-table-row > strong { grid-column: 1 / -1; border: 0; border-bottom: 1px solid var(--ds-border); padding: 8px 0; }
  .annual-week-table-row > div { min-height: 0; border: 1px solid var(--ds-border); border-radius: 11px; padding: 8px; }
  .annual-week-table-row > div:empty { display: none; }
  .annual-week-table-row > div:not(:empty)::before { color: var(--ds-text-muted); content: attr(data-weekday-label); font-weight: 750; }

  .annual-year-trend > div:last-child { overflow-x: auto; grid-template-columns: repeat(12, 42px); }
}

@media (max-width: 540px) {
  .annual-stage-board .annual-phase-timeline,
  .annual-calendar-filters,
  .annual-week-table-row,
  .annual-year-auto-summary .annual-year-metrics,
  .annual-self-score-details > div { grid-template-columns: 1fr; }

  .annual-event-form { grid-template-columns: 1fr; }
  .annual-event-form > * { grid-column: auto !important; }
  .annual-calendar-actions label { grid-column: 1 / -1; min-width: 0; }
  .annual-bill-list > article,
  .annual-review-history > div:last-child > article { grid-template-columns: 1fr; }
  .annual-bill-days > i,
  .annual-bill-days > span { min-height: 38px; }
  .annual-reschedule-field { grid-template-columns: 1fr; }
}

/* Growth timeline */
.timeline-page {
  --timeline-blue: #625bf6;
  --timeline-soft: #f2f4ff;
  --timeline-line: #dfe3f5;
}

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

.timeline-page-heading h2 { margin-bottom: 7px; }
.timeline-page-heading > div:first-child > p:last-child { color: var(--ds-text-muted); margin: 0; max-width: 720px; }
.timeline-page-heading .page-actions { flex: 0 0 auto; }

.timeline-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.timeline-overview article {
  background: #fff;
  border: 1px solid var(--ds-border);
  border-radius: 15px;
  min-width: 0;
  padding: 20px;
}

.timeline-overview .timeline-overview-main {
  background: linear-gradient(135deg, #eff3ff 0%, #f7f5ff 100%);
  border-color: #d9ddff;
}

.timeline-overview span { color: var(--ds-text-muted); display: block; font-size: 12px; font-weight: 760; }
.timeline-overview strong { color: var(--ds-text); display: block; font-size: 27px; line-height: 1.15; margin: 7px 0; }
.timeline-overview p { color: var(--ds-text-muted); font-size: 13px; line-height: 1.5; margin: 0; }
.timeline-overview-main strong { color: var(--timeline-blue); }

.timeline-workspace,
.timeline-source-panel {
  border-radius: 16px;
  margin-bottom: 20px;
  padding: 20px;
}

.timeline-toolbar {
  align-items: end;
  display: grid;
  grid-template-columns: minmax(220px, 1.8fr) repeat(4, minmax(120px, .75fr)) auto;
  gap: 12px;
}

.timeline-toolbar label,
.timeline-editor-grid label {
  color: var(--ds-text-muted);
  display: grid;
  font-size: 12px;
  font-weight: 720;
  gap: 7px;
  min-width: 0;
}

.timeline-toolbar input,
.timeline-toolbar select,
.timeline-editor-grid input,
.timeline-editor-grid select,
.timeline-editor-grid textarea {
  margin: 0;
  min-width: 0;
  width: 100%;
}

.timeline-toolbar > button { min-height: 42px; }

.timeline-viewbar {
  align-items: center;
  border-bottom: 1px solid var(--ds-border);
  display: flex;
  justify-content: space-between;
  margin: 18px 0 0;
  min-height: 52px;
}

.timeline-view-tabs { align-items: stretch; display: flex; gap: 6px; }
.timeline-view-tabs button { background: transparent; border-color: transparent; border-radius: 0; color: var(--ds-text-muted); min-height: 50px; padding: 0 14px; position: relative; }
.timeline-view-tabs button.active { color: var(--timeline-blue); }
.timeline-view-tabs button.active::after { background: var(--timeline-blue); border-radius: 3px 3px 0 0; bottom: -1px; content: ""; height: 3px; left: 10px; position: absolute; right: 10px; }
.timeline-view-tabs button:disabled { color: #a8adbd; cursor: not-allowed; }
.timeline-view-tabs small { font-size: 10px; font-weight: 700; }
.timeline-viewbar .practice-status { margin: 0; text-align: right; }

.timeline-list { display: grid; gap: 12px; margin-top: 16px; }

.timeline-year-section {
  background: #fbfcff;
  border: 1px solid var(--timeline-line);
  border-radius: 15px;
  overflow: visible;
}

.timeline-year-section > summary {
  align-items: center;
  cursor: pointer;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  list-style: none;
  min-height: 60px;
  padding: 0 18px;
}

.timeline-year-section > summary::-webkit-details-marker { display: none; }
.timeline-year-section > summary > span { color: var(--ds-text); font-size: 20px; font-weight: 820; }
.timeline-year-section > summary > small { color: var(--ds-text-muted); font-size: 12px; }
.timeline-year-section > summary > i { color: var(--timeline-blue); font-style: normal; transition: transform .2s ease; }
.timeline-year-section[open] > summary > i { transform: rotate(180deg); }
.timeline-year-body { border-top: 1px solid var(--timeline-line); padding: 6px 18px 18px; }

.timeline-date-group {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 18px;
  padding-top: 18px;
}

.timeline-date-label { align-self: start; padding-top: 10px; position: sticky; top: 78px; }
.timeline-date-label time { color: var(--ds-text); display: block; font-size: 14px; font-weight: 820; }
.timeline-date-label span { color: var(--ds-text-muted); display: block; font-size: 12px; margin-top: 4px; }
.timeline-date-events { display: grid; gap: 12px; min-width: 0; position: relative; }
.timeline-date-events::before { background: var(--timeline-line); bottom: -18px; content: ""; left: 21px; position: absolute; top: 0; width: 2px; }

.timeline-event-card {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: 44px minmax(0, 1fr);
  min-width: 0;
  position: relative;
}

.timeline-event-card:focus-visible .timeline-event-content,
.timeline-event-card:hover .timeline-event-content { border-color: #c7cbff; box-shadow: 0 10px 28px rgba(69, 62, 167, .08); }

.timeline-event-node {
  align-items: center;
  background: #fff;
  border: 2px solid #b9c0de;
  border-radius: 50%;
  color: #68708d;
  display: flex;
  height: 30px;
  justify-content: center;
  margin: 13px auto 0;
  position: relative;
  width: 30px;
  z-index: 1;
}

.timeline-event-card.importance-important .timeline-event-node { border-color: #8b83f8; color: #625bf6; }
.timeline-event-card.importance-milestone .timeline-event-node { background: var(--timeline-blue); border-color: var(--timeline-blue); box-shadow: 0 0 0 5px #eeefff; color: #fff; height: 36px; margin-top: 10px; width: 36px; }
.timeline-event-card.status-draft .timeline-event-node { border-style: dashed; }

.timeline-event-content {
  background: #fff;
  border: 1px solid var(--ds-border);
  border-radius: 14px;
  min-width: 0;
  padding: 16px 18px;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.timeline-event-content > header { align-items: flex-start; display: flex; justify-content: space-between; gap: 12px; }
.timeline-event-badges { display: flex; flex-wrap: wrap; gap: 7px; }
.timeline-event-badges > span,
.timeline-event-tags span {
  background: #f4f5f8;
  border-radius: 999px;
  color: var(--ds-text-muted);
  font-size: 11px;
  font-weight: 740;
  padding: 4px 8px;
}

.timeline-event-badges > span:first-child { background: var(--timeline-soft); color: #5750d8; }
.timeline-event-badges .category-training { background: #fff3e8; color: #b65d17; }
.timeline-event-badges .category-life { background: #ebf8ef; color: #287a47; }
.timeline-event-badges .category-review { background: #f5efff; color: #7848af; }
.timeline-event-badges .status-label { background: #fff7e6; color: #9a6700; }
.timeline-event-content h3 { color: var(--ds-text); font-size: 18px; line-height: 1.45; margin: 10px 0 6px; }
.timeline-event-content > p { color: #596174; display: -webkit-box; font-size: 14px; line-height: 1.65; margin: 0; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.timeline-event-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.timeline-event-tags span { background: transparent; border: 1px solid #e3e6ef; }
.timeline-event-content > footer { align-items: center; border-top: 1px solid #edf0f5; display: flex; gap: 12px; justify-content: space-between; margin-top: 14px; padding-top: 12px; }
.timeline-event-content > footer > span { color: var(--ds-text-muted); font-size: 12px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timeline-event-content > footer button { background: transparent; border-color: transparent; color: var(--timeline-blue); min-height: 32px; padding: 3px 6px; }

.timeline-more-menu { flex: 0 0 auto; position: relative; }
.timeline-more-menu > summary { align-items: center; border: 1px solid #e1e4ed; border-radius: 9px; color: #68708d; cursor: pointer; display: flex; font-weight: 800; height: 32px; justify-content: center; list-style: none; width: 36px; }
.timeline-more-menu > summary::-webkit-details-marker { display: none; }
.timeline-more-menu > div { background: #fff; border: 1px solid var(--ds-border); border-radius: 10px; box-shadow: 0 16px 35px rgba(27, 31, 50, .14); display: grid; min-width: 130px; padding: 6px; position: absolute; right: 0; top: 38px; z-index: 8; }
.timeline-more-menu button { background: transparent; border: 0; justify-content: flex-start; min-height: 34px; text-align: left; }

.timeline-annual-layout .timeline-year-section[open] .timeline-year-body { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.timeline-annual-layout .timeline-date-group { background: #fff; border: 1px solid var(--ds-border); border-radius: 13px; display: block; padding: 14px; }
.timeline-annual-layout .timeline-date-label { align-items: center; display: flex; gap: 8px; padding: 0 0 10px; position: static; }
.timeline-annual-layout .timeline-date-label span { margin: 0; }
.timeline-annual-layout .timeline-date-events::before { display: none; }
.timeline-annual-layout .timeline-event-card { grid-template-columns: 30px minmax(0, 1fr); }
.timeline-annual-layout .timeline-event-node { height: 24px; margin-top: 12px; width: 24px; }
.timeline-annual-layout .timeline-event-content { border: 0; border-radius: 0; padding: 9px 0 12px; }

.timeline-empty-state {
  align-items: center;
  background: #fafbff;
  border: 1px dashed #cfd4e8;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  min-height: 230px;
  padding: 30px;
  text-align: center;
}
.timeline-empty-state > span { color: var(--timeline-blue); font-size: 28px; }
.timeline-empty-state strong { margin-top: 8px; }
.timeline-empty-state p { color: var(--ds-text-muted); margin: 7px 0 16px; }

.timeline-source-panel .panel-head { margin-bottom: 14px; }
.timeline-draft-sources { display: grid; gap: 9px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.timeline-draft-sources > article { align-items: center; border: 1px solid var(--ds-border); border-radius: 12px; display: grid; gap: 10px; grid-template-columns: 34px minmax(0, 1fr) auto; min-width: 0; padding: 12px; }
.timeline-source-icon { align-items: center; background: var(--timeline-soft); border-radius: 10px; color: var(--timeline-blue); display: flex; height: 34px; justify-content: center; width: 34px; }
.timeline-draft-sources article > div { display: grid; min-width: 0; }
.timeline-draft-sources strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timeline-draft-sources small { color: var(--ds-text-muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timeline-draft-sources button { min-height: 34px; }
.timeline-source-empty { color: var(--ds-text-muted); display: grid; gap: 4px; grid-column: 1 / -1; padding: 20px 4px; }
.timeline-source-empty strong { color: var(--ds-text); }
.timeline-sources-toggle { background: transparent; border-color: #d8dcf0; color: var(--timeline-blue); grid-column: 1 / -1; justify-self: center; min-height: 36px; }

.timeline-editor-panel { max-width: 820px; }
.timeline-editor-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.timeline-editor-grid .wide-field { grid-column: 1 / -1; }
.timeline-editor-grid label small { color: var(--ds-text-muted); font-weight: 500; }
.timeline-editor-grid .check-line { align-items: center; display: flex; flex-direction: row; }
.timeline-editor-grid .check-line input { flex: 0 0 auto; width: auto; }
.timeline-advanced-fields { border: 1px solid var(--ds-border); border-radius: 13px; margin-top: 16px; }
.timeline-advanced-fields > summary { align-items: center; cursor: pointer; display: flex; font-weight: 780; justify-content: space-between; list-style: none; min-height: 48px; padding: 0 14px; }
.timeline-advanced-fields > summary::-webkit-details-marker { display: none; }
.timeline-advanced-fields > summary span { color: var(--ds-text-muted); font-size: 12px; font-weight: 500; }
.timeline-advanced-fields[open] > summary { border-bottom: 1px solid var(--ds-border); }
.timeline-advanced-fields > .timeline-editor-grid { padding: 14px; }

.timeline-image-draft-list { display: grid; gap: 8px; padding: 0 14px 14px; }
.timeline-image-draft-list > article { align-items: center; border: 1px solid var(--ds-border); border-radius: 10px; display: grid; gap: 10px; grid-template-columns: 54px minmax(0, 1fr) auto; padding: 8px; }
.timeline-image-draft-list img { background: #f4f5f8; border-radius: 8px; height: 48px; object-fit: cover; width: 54px; }
.timeline-image-draft-list article > div { display: grid; min-width: 0; }
.timeline-image-draft-list article strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timeline-image-draft-list article span,
.timeline-image-draft-list > p { color: var(--ds-text-muted); font-size: 12px; margin: 0; }

.timeline-detail-modal { align-items: stretch; justify-content: flex-end; padding: 0; }
.timeline-detail-panel { border-radius: 18px 0 0 18px; height: 100vh; margin: 0; max-height: 100vh; max-width: 620px; width: min(620px, 92vw); }
.timeline-detail-body { display: grid; gap: 18px; }
.timeline-detail-summary time { color: var(--timeline-blue); font-size: 13px; font-weight: 780; }
.timeline-detail-summary p { color: var(--ds-text-secondary); font-size: 15px; line-height: 1.75; margin: 10px 0; white-space: pre-wrap; }
.timeline-detail-summary > div { display: flex; flex-wrap: wrap; gap: 6px; }
.timeline-detail-summary > div span,
.timeline-detail-links span { background: #f3f4f8; border-radius: 999px; color: #596174; font-size: 12px; padding: 5px 9px; }
.timeline-detail-gallery { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.timeline-detail-gallery a { background: #f4f5f8; border-radius: 12px; display: block; min-height: 140px; overflow: hidden; }
.timeline-detail-gallery img { height: 100%; max-height: 260px; object-fit: contain; width: 100%; }
.timeline-detail-facts { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.timeline-detail-facts article { background: #f8f9fc; border-radius: 11px; display: grid; gap: 5px; min-width: 0; padding: 12px; }
.timeline-detail-facts span { color: var(--ds-text-muted); font-size: 12px; }
.timeline-detail-facts strong { overflow-wrap: anywhere; }
.timeline-detail-links { display: grid; gap: 12px; }
.timeline-detail-links > div { border-top: 1px solid var(--ds-border); padding-top: 14px; }
.timeline-detail-links p { display: flex; flex-wrap: wrap; gap: 7px; margin: 9px 0 0; }
.timeline-private-media { background: #f5f3ff; border-radius: 12px; display: grid; gap: 4px; padding: 18px; }
.timeline-private-media span { color: var(--ds-text-muted); }

body.public-mode #timelineManageMenuBtn,
body.public-mode #openTimelineModalBtn,
body.public-mode .timeline-source-panel { display: none !important; }

@media (max-width: 1180px) {
  .timeline-toolbar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .timeline-search-field { grid-column: span 2; }
  .timeline-toolbar > button { width: 100%; }
}

@media (max-width: 768px) {
  .timeline-page-heading { align-items: stretch; flex-direction: column; gap: 14px; }
  .timeline-page-heading .page-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .timeline-overview { gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .timeline-overview article { padding: 16px; }
  .timeline-workspace,
  .timeline-source-panel { padding: 16px; }
  .timeline-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .timeline-search-field { grid-column: 1 / -1; }
  .timeline-viewbar { align-items: flex-start; flex-direction: column; }
  .timeline-viewbar .practice-status { padding: 10px 0; text-align: left; }
  .timeline-year-section > summary { padding: 0 14px; }
  .timeline-year-body { padding: 4px 12px 14px; }
  .timeline-date-group { grid-template-columns: 1fr; gap: 8px; padding-top: 14px; }
  .timeline-date-label { align-items: center; display: flex; gap: 8px; padding: 0 0 2px 4px; position: static; }
  .timeline-date-label span { margin: 0; }
  .timeline-annual-layout .timeline-year-section[open] .timeline-year-body,
  .timeline-draft-sources { grid-template-columns: 1fr; }
  .timeline-editor-grid { grid-template-columns: 1fr; }
  .timeline-editor-grid .wide-field { grid-column: auto; }
  .timeline-detail-panel { border-radius: 14px 0 0 14px; width: min(560px, 96vw); }
}

@media (max-width: 430px) {
  .timeline-page-heading .page-actions,
  .timeline-toolbar { grid-template-columns: 1fr; }
  .timeline-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .timeline-overview strong { font-size: 23px; }
  .timeline-workspace { padding: 12px; }
  .timeline-search-field { grid-column: auto; }
  .timeline-view-tabs { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
  .timeline-view-tabs button { padding: 0 6px; }
  .timeline-year-section > summary { grid-template-columns: auto 1fr auto; min-height: 56px; padding: 0 11px; }
  .timeline-year-section > summary > span { font-size: 18px; }
  .timeline-event-card { gap: 7px; grid-template-columns: 32px minmax(0, 1fr); }
  .timeline-date-events::before { left: 15px; }
  .timeline-event-node { height: 24px; margin-top: 13px; width: 24px; }
  .timeline-event-card.importance-milestone .timeline-event-node { box-shadow: 0 0 0 3px #eeefff; height: 28px; margin-top: 11px; width: 28px; }
  .timeline-event-content { padding: 14px; }
  .timeline-event-content h3 { font-size: 16px; }
  .timeline-event-content > footer { align-items: flex-start; flex-direction: column; gap: 4px; }
  .timeline-event-content > footer button { padding-left: 0; }
  .timeline-draft-sources > article { grid-template-columns: 32px minmax(0, 1fr); }
  .timeline-draft-sources > article > button { grid-column: 1 / -1; width: 100%; }
  .timeline-detail-panel { border-radius: 0; width: 100vw; }
  .timeline-detail-facts,
  .timeline-detail-gallery { grid-template-columns: 1fr; }
  .timeline-image-draft-list > article { grid-template-columns: 48px minmax(0, 1fr); }
  .timeline-image-draft-list article > button { grid-column: 1 / -1; width: 100%; }
}

/* Global workspace bar and reusable page header */
.workspace-topbar {
  height: var(--ds-topbar-height);
  min-height: var(--ds-topbar-height);
  gap: 16px;
  padding-block: 0;
}

.workspace-heading,
.workspace-heading-title {
  min-width: 0;
}

.workspace-heading {
  display: flex;
  align-items: center;
}

.workspace-heading-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.workspace-heading-title > span {
  display: inline-flex;
  align-items: center;
  color: var(--ds-text-muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.workspace-heading-title > span::after {
  width: 1px;
  height: 14px;
  margin-left: 9px;
  background: var(--ds-border);
  content: "";
}

.workspace-heading strong {
  overflow: hidden;
  color: var(--ds-text);
  font-size: 15px;
  font-weight: 750;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-tools {
  margin-left: auto;
}

#workspaceDate {
  color: var(--ds-text-muted);
  font-size: 12px;
  white-space: nowrap;
}

.page-heading.page-header,
.page-heading-centered.page-header,
.timeline-page-heading.page-header {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto;
  align-items: end;
  justify-items: stretch;
  gap: 18px 28px;
  min-height: 0;
  margin: 0 0 24px;
  border: 0;
  border-bottom: 1px solid var(--ds-border);
  background: transparent;
  padding: 0 0 18px 14px;
  text-align: left;
}

.page-header::before {
  position: absolute;
  top: 3px;
  bottom: 20px;
  left: 0;
  width: 3px;
  border-radius: var(--ds-radius-pill);
  background: var(--ds-brand);
  content: "";
}

.page-header-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.page-header-context {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  color: var(--ds-text-faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.4;
}

.page-header-context span:first-child {
  color: var(--ds-text-muted);
}

.page-header h2,
.page-heading.page-header h2,
.page-heading-centered.page-header h2 {
  margin: 0;
  color: var(--ds-text);
  font-size: clamp(24px, 2vw, 28px);
  font-weight: 760;
  letter-spacing: -.025em;
  line-height: 1.2;
}

.page-header-description {
  max-width: 760px;
  margin: 2px 0 0;
  color: var(--ds-text-muted);
  font-size: 14px;
  line-height: 1.55;
}

.page-header .page-actions,
.page-header-actions {
  position: static;
  display: flex;
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  align-items: center;
  justify-self: end;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  width: auto;
  margin: 0;
  transform: none;
}

.page-header .page-actions > *,
.page-header .page-actions button {
  flex: 0 0 auto;
  min-height: 38px;
}

.page-header .page-actions .primary {
  box-shadow: none;
}

#page-home .home-command-bar {
  justify-content: flex-start;
}

@media (max-width: 768px) {
  .workspace-topbar {
    height: 64px;
    min-height: 64px;
    gap: 12px;
    padding-block: 0;
  }

  .workspace-heading-title > span,
  .workspace-heading-title > span::after {
    display: none;
  }

  .workspace-heading strong {
    font-size: 15px;
  }

  .page-heading.page-header,
  .page-heading-centered.page-header,
  .timeline-page-heading.page-header {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 14px;
    margin-bottom: 20px;
    padding: 0 0 16px 12px;
  }

  .page-header::before {
    bottom: 18px;
  }

  .page-header .page-actions,
  .page-header-actions {
    grid-column: 1;
    grid-row: auto;
    align-self: auto;
    justify-self: stretch;
    justify-content: flex-start;
    width: 100%;
    margin: 0;
  }
}

@media (max-width: 520px) {
  .page-header h2,
  .page-heading.page-header h2,
  .page-heading-centered.page-header h2 {
    font-size: 24px;
  }

  .page-header .page-actions > *,
  .page-header .page-actions button {
    flex: 1 1 calc(50% - 4px);
  }

  .page-header .page-actions > .primary,
  .page-header .page-actions button.primary {
    flex-basis: 100%;
  }
}

#page-annual .annual-page-heading.page-header {
  margin: 0 0 24px;
  padding: 0 0 18px 14px;
}

#page-annual .annual-page-heading.page-header h2 {
  font-size: clamp(24px, 2vw, 28px);
}

#page-annual .annual-page-heading.page-header .page-actions {
  position: static;
  top: auto;
  right: auto;
  margin: 0;
}

@media (max-width: 768px) {
  #page-annual .annual-page-heading.page-header {
    margin-bottom: 20px;
    padding: 0 0 16px 12px;
  }
}

@media (max-width: 520px) {
  #page-annual .annual-page-heading.page-header h2 {
    font-size: 24px;
  }
}

/* Dashboard v5: a quieter personal training ledger with faster daily access. */
#page-home .home-profile-stage {
  overflow: hidden;
  border: 1px solid var(--ds-border);
  background: var(--ds-surface);
  box-shadow: var(--ds-shadow-surface);
}

#page-home .home-profile-stage .carousel-shell,
#page-home .carousel-shell {
  height: auto;
  min-height: 360px;
  max-height: min(560px, 70vh);
  aspect-ratio: var(--carousel-aspect, 16 / 9);
  border: 0;
  background: #141927;
  box-shadow: none;
}

#page-home .carousel-frame::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(90deg, rgb(12 18 32 / 55%) 0%, rgb(12 18 32 / 18%) 42%, transparent 70%),
    linear-gradient(0deg, rgb(12 18 32 / 52%) 0%, transparent 48%);
  content: "";
  pointer-events: none;
}

#page-home .carousel-shell .carousel-backdrop {
  inset: -24px;
  width: calc(100% + 48px);
  height: calc(100% + 48px);
  object-fit: cover;
  object-position: center;
  filter: blur(20px) saturate(.94) brightness(.86);
  opacity: .9;
  transform: scale(1.08);
  pointer-events: none;
}

#page-home .carousel-shell #carouselImage {
  object-fit: contain;
  object-position: center;
  filter: saturate(.96) contrast(1.02);
}

#page-home .home-profile-stage .carousel-caption,
#page-home .carousel-caption {
  z-index: 3;
  max-width: min(620px, 62%);
  gap: 4px;
  background: transparent;
  padding: 72px 28px 54px;
}

#page-home .home-profile-stage .carousel-caption span {
  min-height: 23px;
  border-color: rgb(255 255 255 / 28%);
  background: rgb(12 18 32 / 24%);
  padding: 3px 9px;
  font-size: 12px;
  letter-spacing: .06em;
  backdrop-filter: blur(6px);
}

#page-home .carousel-caption strong {
  display: -webkit-box;
  overflow: hidden;
  max-width: 100%;
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.25;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#page-home .carousel-caption small {
  color: rgb(255 255 255 / 82%);
  font-size: 13px;
  line-height: 1.45;
}

#page-home .carousel-manage {
  z-index: 5;
}

#page-home .home-profile-stage .home-profile-panel {
  grid-template-columns: minmax(340px, 1.2fr) minmax(400px, .9fr);
  grid-template-rows: auto;
  gap: 22px;
  margin: -30px 20px 14px;
  border: 0;
  border-radius: 14px;
  background: rgb(255 255 255 / 98%);
  padding: 16px 18px;
  box-shadow: 0 8px 22px rgb(24 34 48 / 9%);
  backdrop-filter: blur(10px);
}

#page-home .home-profile-identity {
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 15px;
}

#page-home .profile-avatar-shell {
  width: 96px;
  height: 124px;
  border-width: 3px;
  border-radius: 20px;
  border-color: var(--ds-surface);
  background: linear-gradient(145deg, #f5f6f8, #e9edf3);
  color: var(--ds-text-secondary);
  box-shadow: 0 5px 14px rgb(52 64 84 / 12%);
}

#page-home .profile-avatar-shell img {
  object-position: center;
}

#page-home .home-copy,
#page-home .home-name-row {
  min-width: 0;
}

#page-home .home-copy .eyebrow,
#page-home .home-overview .eyebrow {
  color: var(--ds-text-muted);
  font-size: 12px;
  letter-spacing: .065em;
}

#page-home .home-copy .home-name-row h2 {
  max-width: 100%;
  color: var(--ds-text);
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 740;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}

#page-home .home-copy .home-name-row h2.is-long-identifier {
  display: -webkit-box;
  overflow: hidden;
  max-width: min(100%, 520px);
  color: var(--ds-text-muted);
  font-size: clamp(15px, 1.35vw, 18px);
  font-weight: 620;
  letter-spacing: 0;
  line-height: 1.4;
  word-break: break-all;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#page-home .home-copy .home-name-row > span {
  min-height: 25px;
  border: 0;
  background: var(--ds-surface-muted);
  color: var(--ds-text-secondary);
  padding: 3px 8px;
  font-size: 13px;
  font-weight: 680;
}

#page-home .home-copy .hero-lead {
  margin: 6px 0 9px;
  color: var(--ds-text-muted);
  font-size: 14px;
  line-height: 1.55;
}

#page-home .home-profile-actions {
  gap: 6px;
}

#page-home .home-profile-actions button {
  min-height: 34px;
}

#page-home .profile-detail-link {
  border-color: transparent;
  background: transparent;
  color: var(--ds-brand-strong);
  padding-inline: 4px;
}

#page-home .profile-edit-button {
  border-color: var(--ds-border);
  background: var(--ds-surface);
  color: var(--ds-text-secondary);
}

#page-home .home-profile-panel .metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
}

#page-home .home-profile-panel .metric {
  min-height: 62px;
  gap: 3px;
  border: 0;
  border-left: 1px solid var(--ds-border);
  border-radius: 0;
  background: transparent;
  padding: 6px 12px;
  box-shadow: none;
}

#page-home .home-profile-panel .metric:first-child {
  border-left: 0;
}

#page-home .home-profile-panel .metric span,
#page-home .home-profile-panel .metric small {
  color: var(--ds-text-muted);
  font-size: 13px !important;
}

#page-home .home-profile-panel .metric strong {
  color: var(--ds-text);
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

#page-home .home-dashboard-grid {
  grid-template-columns: minmax(280px, 310px) minmax(0, 1fr);
  gap: 14px;
  margin-top: 14px;
}

#page-home .home-dashboard-sidebar,
#page-home .home-dashboard-main {
  gap: 14px;
}

#page-home .home-command-bar {
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  border: 0;
  border-bottom: 1px solid var(--ds-border);
  border-radius: 0;
  background: transparent;
  padding: 2px 0 12px;
  box-shadow: none;
}

#page-home .home-command-actions {
  flex: 0 0 auto;
  margin-left: auto;
}

#page-home .home-command-copy h2 {
  font-size: clamp(19px, 1.8vw, 22px);
  font-variant-numeric: tabular-nums;
}

#page-home .home-command-copy > p:last-child {
  color: var(--ds-text-muted);
  font-size: 13px;
  line-height: 1.5;
}

#page-home .home-dashboard-grid .panel {
  border-color: var(--ds-border);
  background: var(--ds-surface);
  box-shadow: none;
}

#page-home .home-calendar-panel,
#page-home .home-reminders-panel,
#page-home .home-annual-panel {
  min-height: 0;
  border-top: 1px solid var(--ds-border);
  padding: 16px;
}

#page-home .home-section-heading h2,
#page-home .home-calendar-head h2,
#page-home .panel-head h2 {
  color: var(--ds-text);
  font-size: 18px;
  font-weight: 720;
  letter-spacing: -.015em;
}

#page-home .home-section-heading > div > span,
#page-home .panel-head span,
#page-home .home-calendar-legend,
#page-home .home-reminder-item small,
#page-home .home-annual-metrics span,
#page-home .home-annual-metrics small {
  color: var(--ds-text-muted);
  font-size: 13px !important;
  line-height: 1.5;
}

#page-home .home-status-badge,
#page-home .home-ai-label {
  min-height: 25px;
  background: var(--ds-surface-muted);
  color: var(--ds-text-muted);
  padding: 3px 8px;
  font-size: 12px;
}

#page-home .home-mini-calendar > button:hover,
#page-home .home-mini-calendar > button.selected:not(.today) {
  border-color: transparent;
  background: var(--ds-surface-muted);
  color: var(--ds-text-secondary);
}

#page-home .home-mini-calendar > button.has-task::after,
#page-home .home-calendar-legend i.has-task {
  background: var(--ds-text-faint);
}

#page-home .home-mini-calendar > button.today span {
  background: var(--ds-brand);
}

#page-home .home-reminder-list {
  gap: 0;
}

#page-home .home-reminder-item {
  min-height: 54px;
  border: 0;
  border-bottom: 1px solid var(--ds-border);
  border-radius: 0;
  background: transparent;
  padding: 9px 2px;
}

#page-home .home-reminder-item:last-child {
  border-bottom: 0;
}

#page-home .home-reminder-item:hover {
  border-color: var(--ds-border);
  background: var(--ds-surface-subtle);
}

#page-home .home-reminder-item strong {
  color: var(--ds-text-secondary);
  font-size: 14px !important;
}

#page-home .home-annual-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin-top: 12px;
  border-top: 1px solid var(--ds-border);
}

#page-home .home-annual-metrics article {
  min-height: 88px;
  gap: 3px;
  border: 0;
  border-bottom: 1px solid var(--ds-border);
  border-radius: 0;
  background: transparent;
  padding: 12px;
}

#page-home .home-annual-metrics article:nth-child(odd) {
  border-right: 1px solid var(--ds-border);
  padding-left: 0;
}

#page-home .home-annual-metrics article:nth-child(even) {
  padding-right: 0;
}

#page-home .home-annual-metrics article:nth-last-child(-n + 2) {
  border-bottom: 0;
}

#page-home .home-annual-metrics strong {
  color: var(--ds-text);
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

#page-home .home-execution-panel {
  min-height: 0;
  grid-template-columns: minmax(0, 1.62fr) minmax(250px, .86fr);
}

#page-home .home-execution-main,
#page-home .home-brief-panel {
  padding: 17px 18px;
}

#page-home .home-progress-summary {
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  margin: 9px 0;
}

#page-home .home-progress-ring {
  width: 68px;
  height: 68px;
  align-content: center;
  justify-items: center;
  gap: 0;
}

#page-home .home-progress-ring::after {
  inset: 7px;
}

#page-home .home-progress-ring strong {
  font-size: 18px;
  line-height: 1.05;
}

#page-home .home-progress-copy > span,
#page-home .home-execution-item small,
#page-home .todo-item-copy > span {
  color: var(--ds-text-muted);
  font-size: 13px !important;
}

#page-home .home-progress-ring span {
  margin-top: 1px;
  color: var(--ds-text-muted);
  font-size: 10px !important;
  line-height: 1.1;
  white-space: nowrap;
}

#page-home .home-execution-date-tools .daily-todo-date {
  width: 152px;
  min-height: 38px;
  font-size: 13px;
}

#page-home .home-progress-copy > strong,
#page-home .home-execution-item strong,
#page-home .todo-item-copy strong {
  color: var(--ds-text-secondary);
  font-size: 14px !important;
}

#page-home .home-execution-list .home-empty-state {
  grid-template-columns: 42px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  justify-items: start;
  min-height: 92px;
  gap: 2px 12px;
  background: transparent;
  padding: 10px 14px 10px 12px;
  text-align: left;
}

#page-home .home-execution-list .home-empty-state > span {
  width: 38px;
  height: 38px;
  grid-row: 1 / span 2;
}

#page-home .home-execution-list .home-empty-state strong {
  margin: 0;
  color: var(--ds-text-secondary);
  font-size: 14px !important;
}

#page-home .home-execution-list .home-empty-state p {
  color: var(--ds-text-muted);
  font-size: 13px;
  line-height: 1.45;
}

#page-home .home-execution-list .home-empty-state button {
  grid-column: 3;
  grid-row: 1 / span 2;
  margin: 0;
}

#page-home .home-execution-actions {
  padding-right: 10px;
}

#page-home .home-brief-panel {
  border-left-color: var(--ds-border);
  background: var(--ds-surface-subtle);
}

#page-home .home-brief-list {
  gap: 0;
  margin: 10px 0;
}

#page-home .home-brief-list article,
#page-home .home-brief-list article.risk,
#page-home .home-brief-list article.good {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  min-height: 0;
  border: 0;
  border-bottom: 1px solid var(--ds-border);
  border-radius: 0;
  background: transparent;
  padding: 7px 0;
}

#page-home .home-brief-list article:last-child {
  border-bottom: 0;
}

#page-home .home-brief-list span {
  color: var(--ds-text-muted);
  font-size: 13px !important;
}

#page-home .home-brief-list strong {
  margin-top: 0;
  color: var(--ds-text-secondary);
  font-size: 13px;
  line-height: 1.45;
}

#page-home .home-brief-panel > button {
  border-color: transparent;
  background: transparent;
  color: var(--ds-brand-strong);
}

#page-home .home-status-panel,
#page-home .home-highlights-panel {
  padding: 17px 18px;
}

#page-home .home-status-panel .panel-head,
#page-home .home-highlights-panel .panel-head {
  margin-bottom: 10px;
}

#page-home .today-panel-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--ds-border);
}

#page-home .today-card,
#page-home .today-card.done,
#page-home .today-card.warn,
#page-home .today-card.todo {
  min-height: 108px;
  border: 0;
  border-left: 1px solid var(--ds-border);
  border-radius: 0;
  background: transparent;
  padding: 13px 14px;
}

#page-home .today-card:first-child {
  border-left: 0;
}

#page-home .today-card:hover {
  border-color: var(--ds-border);
  background: var(--ds-surface-subtle);
  transform: none;
}

#page-home .today-card-icon,
#page-home .today-card.todo .today-card-icon {
  background: var(--ds-surface-muted);
  color: var(--ds-text-muted) !important;
}

#page-home .today-card-label {
  color: var(--ds-text-muted) !important;
  font-size: 13px !important;
}

#page-home .today-card strong {
  color: var(--ds-text);
  font-size: 15px;
}

#page-home .today-card small {
  color: var(--ds-text-muted);
  font-size: 13px;
}

#page-home .home-highlights-panel .highlight-list {
  border: 0;
  border-top: 1px solid var(--ds-border);
  border-radius: 0;
}

#page-home .highlight-item {
  min-height: 58px;
  border-top: 1px solid var(--ds-border);
  background: transparent;
  padding: 9px 2px;
}

#page-home .highlight-item:first-child {
  border-top: 0;
}

#page-home .highlight-marker,
#page-home .highlight-item.progress .highlight-marker,
#page-home .highlight-item.learning .highlight-marker,
#page-home .highlight-item.life .highlight-marker {
  background: var(--ds-surface-muted);
  color: var(--ds-text-muted) !important;
}

#page-home .highlight-copy strong {
  color: var(--ds-text-secondary);
  font-size: 14px !important;
}

#page-home .highlight-copy span,
#page-home .highlight-item time {
  color: var(--ds-text-muted);
  font-size: 13px !important;
}

@media (min-width: 901px) and (max-width: 1180px) {
  #page-home .home-profile-stage .home-profile-panel {
    grid-template-columns: minmax(300px, 1.15fr) minmax(350px, .9fr);
  }

  #page-home .home-dashboard-sidebar {
    grid-template-columns: minmax(0, 1fr);
  }

  #page-home .home-dashboard-sidebar .home-annual-panel {
    grid-column: auto;
  }
}

@media (max-width: 900px) {
  #page-home .home-profile-stage .carousel-shell,
  #page-home .carousel-shell {
    height: auto;
    min-height: 280px;
    max-height: min(440px, 60vh);
  }

  #page-home .home-profile-stage .home-profile-panel {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    margin: -26px 14px 12px;
  }

  #page-home .home-dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  #page-home .home-dashboard-sidebar {
    display: grid;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: min(82vw, 340px);
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 6px;
    scroll-padding-inline: 1px;
    scroll-snap-type: x proximity;
    scrollbar-color: var(--ds-border-strong) transparent;
    scrollbar-width: thin;
  }

  #page-home .home-dashboard-sidebar > .panel {
    grid-column: auto;
    min-height: 296px;
    max-height: 320px;
    overflow-y: auto;
    scroll-snap-align: start;
  }

  #page-home .home-execution-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  #page-home .home-brief-panel {
    border-top: 1px solid var(--ds-border);
    border-left: 0;
  }

  #page-home .today-panel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #page-home .today-card {
    border-left: 0;
  }

  #page-home .today-card:nth-child(even) {
    border-left: 1px solid var(--ds-border);
  }

  #page-home .today-card:nth-child(n + 3) {
    border-top: 1px solid var(--ds-border);
  }
}

@media (max-width: 640px) {
  #page-home .home-command-bar {
    align-items: stretch;
    flex-direction: column;
  }

  #page-home .home-command-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    margin-left: 0;
  }

  #page-home .home-command-actions > * {
    width: 100%;
  }
}

@media (max-width: 520px) {
  #page-home .home-profile-stage .carousel-shell,
  #page-home .carousel-shell {
    height: auto;
    min-height: 220px;
    max-height: min(340px, 52vh);
  }

  #page-home .home-profile-stage .carousel-caption,
  #page-home .carousel-caption {
    max-width: 78%;
    padding: 44px 14px 42px;
  }

  #page-home .carousel-caption small {
    display: none;
  }

  #page-home .home-command-bar {
    align-items: stretch;
    flex-direction: column;
  }

  #page-home .home-command-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    margin-left: 0;
  }

  #page-home .home-command-actions > * {
    width: 100%;
  }

  #page-home .home-profile-stage .home-profile-panel {
    gap: 12px;
    margin: -20px 10px 10px;
    padding: 14px;
  }

  #page-home .home-profile-identity {
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 11px;
  }

  #page-home .profile-avatar-shell {
    width: 80px;
    height: 104px;
    border-radius: 17px;
  }

  #page-home .home-copy .home-name-row h2 {
    font-size: 21px;
  }

  #page-home .home-copy .home-name-row h2.is-long-identifier {
    font-size: 14px;
  }

  #page-home .home-copy .hero-lead {
    font-size: 13px;
  }

  #page-home .home-profile-panel .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #page-home .home-profile-panel .metric {
    border-top: 0;
    border-left: 0;
    padding: 8px 10px;
  }

  #page-home .home-profile-panel .metric:nth-child(even) {
    border-left: 1px solid var(--ds-border);
  }

  #page-home .home-profile-panel .metric:nth-child(n + 3) {
    border-top: 1px solid var(--ds-border);
  }

  #page-home .home-dashboard-sidebar {
    grid-auto-columns: min(86vw, 326px);
  }

  #page-home .home-dashboard-sidebar > .panel {
    min-height: 286px;
    max-height: 306px;
  }

  #page-home .home-command-bar {
    min-height: 54px;
    padding-bottom: 10px;
  }

  #page-home .home-execution-main,
  #page-home .home-brief-panel,
  #page-home .home-status-panel,
  #page-home .home-highlights-panel {
    padding: 15px;
  }

  #page-home .home-execution-list .home-empty-state {
    grid-template-columns: 38px minmax(0, 1fr);
    min-height: 116px;
  }

  #page-home .home-execution-list .home-empty-state > span {
    width: 34px;
    height: 34px;
  }

  #page-home .home-execution-list .home-empty-state button {
    grid-column: 1 / -1;
    grid-row: auto;
    justify-self: stretch;
    width: 100%;
    margin-top: 5px;
  }

  #page-home .today-panel-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  #page-home .today-card,
  #page-home .today-card:nth-child(even) {
    min-height: 96px;
    border-left: 0;
  }

  #page-home .today-card:nth-child(n + 2) {
    border-top: 1px solid var(--ds-border);
  }
}

@media (max-width: 520px) {
  #page-home .home-profile-actions {
    display: flex;
    grid-template-columns: none;
    flex-wrap: wrap;
  }

  #page-home .profile-detail-link {
    white-space: nowrap;
  }

  #page-home .home-profile-panel .metric {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-content: center;
    gap: 1px 6px;
    min-height: 64px;
  }

  #page-home .home-profile-panel .metric strong {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
  }

  #page-home .home-execution-date-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    width: 100%;
  }

  #page-home .home-execution-date-tools > *,
  #page-home .home-execution-date-tools .daily-todo-date {
    order: 0;
    width: auto;
    min-width: 0;
  }

  #page-home .home-execution-date-tools .daily-todo-date {
    width: 100%;
  }
}

#page-honors {
  max-width: 1320px;
  gap: 24px;
  padding-top: clamp(20px, 2.4vw, 32px);
  padding-bottom: clamp(44px, 5vw, 72px);
}

#page-honors.active {
  display: grid;
}

#page-honors .achievement-page-heading {
  align-items: end;
  margin-bottom: 0;
}

#page-honors .achievement-page-heading .page-header-description {
  max-width: 720px;
}

#page-honors .achievement-page-heading .page-actions {
  align-self: end;
  gap: 8px;
}

#page-honors .achievement-page-heading .page-actions button {
  min-height: 38px;
  font-size: 13px;
}

#page-honors .achievement-overview {
  grid-template-columns: minmax(300px, 1.65fr) repeat(4, minmax(145px, 1fr));
  gap: 0;
  border-top: 1px solid var(--ds-border);
  border-bottom: 1px solid var(--ds-border);
}

#page-honors .achievement-overview article {
  min-height: 108px;
  gap: 4px;
  border: 0;
  border-right: 1px solid var(--ds-border);
  border-radius: 0;
  background: transparent;
  padding: 18px 20px;
}

#page-honors .achievement-overview article:last-child {
  border-right: 0;
}

#page-honors .achievement-overview .achievement-overview-main {
  border-left: 3px solid var(--ds-brand);
  background: var(--ds-brand-soft);
}

#page-honors .achievement-overview article > span {
  color: var(--ds-text-muted);
  font-size: 13px;
}

#page-honors .achievement-overview article > strong {
  margin: 5px 0 1px;
  color: var(--ds-text);
  font-size: 28px;
}

#page-honors .achievement-overview .achievement-overview-main > span,
#page-honors .achievement-overview .achievement-overview-main > strong {
  color: var(--ds-brand-strong);
}

#page-honors .achievement-overview article > p {
  margin: 3px 0 0;
  color: var(--ds-text-muted);
  font-size: 13px;
  line-height: 1.45;
}

#page-honors .module-switch {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(780px, 100%);
  margin: 0;
  border-bottom: 1px solid var(--ds-border);
}

#page-honors .module-switch button {
  min-height: 48px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--ds-text-muted);
  padding: 8px 12px;
  box-shadow: none;
}

#page-honors .module-switch button:hover,
#page-honors .module-switch button:focus-visible {
  border-bottom-color: var(--ds-border-strong);
  background: transparent;
  color: var(--ds-text-secondary);
  box-shadow: none;
}

#page-honors .module-switch button.active {
  border-bottom-color: var(--ds-brand);
  background: transparent;
  color: var(--ds-brand-strong);
  box-shadow: none;
}

#page-honors .module-switch button small {
  min-width: 26px;
  min-height: 24px;
  border: 1px solid var(--ds-border);
  border-radius: 999px;
  background: var(--ds-surface-subtle);
  color: var(--ds-text-muted);
  padding: 2px 7px;
  font-size: 12px;
}

#page-honors .module-switch button.active small {
  border-color: var(--ds-brand-border);
  background: var(--ds-brand-soft);
  color: var(--ds-brand-strong);
}

#page-honors .achievement-toolbar {
  grid-template-columns: minmax(220px, 1.6fr) repeat(4, minmax(110px, .76fr)) auto;
  gap: 12px;
  border-color: var(--ds-border);
  border-radius: var(--ds-radius-surface);
  background: var(--ds-surface-subtle);
  box-shadow: none;
  padding: 16px 18px;
}

#page-honors .achievement-toolbar label,
#page-honors .achievement-batch-bar label {
  gap: 7px;
  color: var(--ds-text-secondary);
  font-size: 13px;
  line-height: 1.4;
}

#page-honors .achievement-toolbar input,
#page-honors .achievement-toolbar select,
#page-honors .achievement-toolbar button {
  min-height: 40px;
  font-size: 13px;
}

#page-honors .achievement-toolbar > button {
  border-color: transparent;
  background: transparent;
  color: var(--ds-text-muted);
  box-shadow: none;
}

#page-honors .achievement-toolbar > button:hover,
#page-honors .achievement-toolbar > button:focus-visible {
  border-color: var(--ds-border);
  background: var(--ds-surface);
  color: var(--ds-text-secondary);
}

#page-honors .achievement-batch-bar {
  top: calc(var(--ds-topbar-height) + 12px);
  gap: 10px;
  border: 1px solid var(--ds-brand-border);
  border-left: 3px solid var(--ds-brand);
  border-radius: var(--ds-radius-nested);
  background: var(--ds-brand-soft);
  padding: 11px 14px;
  box-shadow: none;
  backdrop-filter: none;
}

#page-honors .achievement-batch-bar > strong {
  color: var(--ds-brand-strong);
  font-size: 13px;
}

#page-honors #honorStatus {
  margin: -8px 0 0;
  color: var(--ds-text-muted);
  font-size: 13px;
}

#page-honors .honor-wall,
#page-honors .showcase-record-list {
  gap: 18px;
}

#page-honors .honor-section-grid {
  grid-template-columns: repeat(var(--honor-columns), minmax(min(100%, 250px), 1fr));
  gap: 18px;
}

#page-honors .achievement-card {
  overflow: visible;
  border-color: var(--ds-border);
  border-radius: var(--ds-radius-surface);
  background: var(--ds-surface);
  padding: 14px;
  box-shadow: var(--ds-shadow-surface);
  transition: border-color var(--ds-motion-fast) ease, box-shadow var(--ds-motion-fast) ease, transform var(--ds-motion-fast) ease;
}

#page-honors .achievement-card:hover,
#page-honors .achievement-card:focus-visible,
#page-honors .achievement-card:focus-within {
  border-color: var(--ds-border-hover);
  box-shadow: var(--ds-shadow-float);
  transform: translateY(-2px);
}

#page-honors .achievement-card:focus-visible {
  outline: var(--ds-focus-ring);
  outline-offset: 3px;
}

#page-honors .achievement-card.is-pinned {
  border-left: 3px solid var(--ds-brand);
}

#page-honors .achievement-card.is-selected {
  border-color: var(--ds-brand-border);
  box-shadow: inset 0 0 0 1px var(--ds-brand-border), var(--ds-shadow-surface);
}

#page-honors .achievement-management-bar {
  display: flex;
  grid-column: 1 / -1;
  min-width: 0;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: -2px 0 2px;
}

#page-honors .achievement-management-bar .achievement-select-control {
  position: static;
  min-height: 32px;
  border: 0;
  background: transparent;
  padding: 0 2px;
  box-shadow: none;
}

#page-honors .achievement-management-bar .achievement-card-actions {
  position: static;
  margin-left: auto;
  opacity: 1;
  pointer-events: auto;
}

#page-honors .achievement-card:has(.achievement-featured-badge) {
  border-top-color: var(--ds-brand);
}

#page-honors .achievement-card.is-dragging {
  opacity: .55;
}

#page-honors .achievement-card .certificate-frame,
#page-honors .showcase-story-cover {
  overflow: hidden;
  aspect-ratio: 5 / 4;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-nested);
  background: var(--ds-surface-subtle);
}

#page-honors .achievement-card .certificate-image {
  aspect-ratio: auto;
  object-fit: contain;
  background: var(--ds-surface-subtle);
}

#page-honors .certificate-placeholder,
#page-honors .certificate-private,
#page-honors .showcase-cover-placeholder,
#page-honors .showcase-private-media {
  position: relative;
  display: grid;
  min-height: 190px;
  align-content: center;
  justify-items: center;
  gap: 8px;
  overflow: hidden;
  background: var(--ds-surface-subtle);
  color: var(--ds-text-secondary);
  padding: 20px;
  text-align: center;
}

#page-honors .certificate-placeholder::before,
#page-honors .showcase-cover-placeholder::before {
  position: absolute;
  top: 22px;
  right: 22px;
  left: 22px;
  height: 1px;
  background: var(--ds-border-strong);
  box-shadow: 0 12px 0 var(--ds-border), 0 24px 0 var(--ds-border);
  content: "";
  opacity: .7;
}

#page-honors .certificate-placeholder > span,
#page-honors .showcase-cover-placeholder > span,
#page-honors .certificate-private > span,
#page-honors .showcase-private-media > span {
  position: relative;
  z-index: 1;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--ds-border-strong);
  border-radius: 50%;
  background: var(--ds-surface);
  color: var(--ds-brand-strong);
  font-size: 16px;
}

#page-honors .certificate-placeholder > strong,
#page-honors .showcase-cover-placeholder > strong,
#page-honors .certificate-private > strong,
#page-honors .showcase-private-media > strong {
  position: relative;
  z-index: 1;
  color: var(--ds-text-secondary);
  font-size: 14px;
}

#page-honors .certificate-placeholder > small,
#page-honors .showcase-cover-placeholder > small,
#page-honors .certificate-private > small,
#page-honors .showcase-private-media > span {
  position: relative;
  z-index: 1;
  color: var(--ds-text-muted);
  font-size: 12px;
  line-height: 1.5;
}

#page-honors .certificate-placeholder.pdf {
  color: var(--ds-brand-strong);
  text-decoration: none;
}

#page-honors .honor-card-top {
  min-height: 30px;
  justify-content: flex-start;
}

#page-honors .achievement-kind-icon {
  width: 28px;
  height: 28px;
  border: 1px solid var(--ds-border);
  border-radius: 50%;
  background: var(--ds-surface-muted);
  color: var(--ds-text-muted);
  font-size: 12px;
}

#page-honors .honor-type-pill {
  border-color: var(--ds-border);
  background: var(--ds-surface-subtle);
  color: var(--ds-text-muted);
  font-size: 12px;
}

#page-honors .achievement-state-badge,
#page-honors .achievement-featured-badge,
#page-honors .showcase-story-meta b {
  border: 1px solid var(--ds-brand-border);
  background: var(--ds-brand-soft);
  color: var(--ds-brand-strong);
  font-size: 12px;
  padding: 4px 8px;
}

#page-honors .achievement-featured-badge {
  border-color: var(--ds-warning-border);
  background: var(--ds-warning-soft);
  color: var(--ds-warning);
}

#page-honors .honor-public-info {
  gap: 9px;
  padding: 3px 2px 2px;
}

#page-honors .honor-public-info > div:first-child {
  align-items: center;
}

#page-honors .achievement-card-date {
  color: var(--ds-text-muted);
  font-size: 13px;
}

#page-honors .honor-public-info h4,
#page-honors .showcase-story-content h3 {
  color: var(--ds-text);
  font-size: 17px;
  line-height: 1.45;
}

#page-honors .honor-public-info > p,
#page-honors .showcase-story-result {
  color: var(--ds-text-secondary);
  font-size: 13px;
  line-height: 1.55;
}

#page-honors .honor-public-meta,
#page-honors .showcase-story-meta,
#page-honors .showcase-story-facts {
  gap: 6px;
}

#page-honors .honor-public-meta span {
  border: 1px solid var(--ds-border);
  background: transparent;
  color: var(--ds-text-muted);
  font-size: 12px;
  padding: 3px 8px;
}

#page-honors .honor-public-meta .skill-certificate-number {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-honors .achievement-card-actions {
  top: 54px;
  right: 18px;
  gap: 5px;
}

#page-honors .achievement-card-actions > button,
#page-honors .achievement-more-menu > summary {
  min-width: 54px;
  min-height: var(--ds-control-height);
  border-color: var(--ds-border);
  border-radius: var(--ds-radius-control);
  background: var(--ds-surface);
  color: var(--ds-text-secondary);
  padding: 8px 12px;
  font-size: 14px !important;
  font-weight: 700;
  line-height: 1.25;
  box-shadow: none;
}

#page-honors .achievement-card-actions > button:hover,
#page-honors .achievement-more-menu > summary:hover,
#page-honors .achievement-more-menu[open] > summary {
  border-color: var(--ds-border-hover);
  background: var(--ds-surface-subtle);
  color: var(--ds-text);
}

#achievementDetailModal .modal-actions {
  gap: 8px;
}

#achievementDetailModal .modal-actions > .achievement-action-button {
  min-height: var(--ds-control-height);
  border-color: var(--ds-border);
  border-radius: var(--ds-radius-control);
  background: var(--ds-surface);
  color: var(--ds-text-secondary);
  padding: 8px 14px;
  font-size: 14px !important;
  font-weight: 700;
  line-height: 1.25;
  box-shadow: none;
}

#achievementDetailModal .modal-actions > .achievement-action-button:hover:not(:disabled) {
  border-color: var(--ds-border-hover);
  background: var(--ds-surface-subtle);
  color: var(--ds-text);
}

#achievementDetailModal .modal-actions > .achievement-action-button.primary {
  border-color: var(--ds-brand);
  background: var(--ds-brand);
  color: var(--ds-on-brand);
}

#achievementDetailModal .modal-actions > .achievement-action-button.primary:hover:not(:disabled) {
  border-color: var(--ds-brand-strong);
  background: var(--ds-brand-strong);
  color: var(--ds-on-brand);
}

#page-honors .achievement-more-menu > div {
  width: 178px;
  border-color: var(--ds-border);
  border-radius: var(--ds-radius-nested);
  box-shadow: var(--ds-shadow-float);
}

#page-honors .achievement-more-menu > div button {
  min-height: 36px;
  color: var(--ds-text-secondary);
  font-size: 13px;
}

#page-honors .achievement-select-control {
  top: 16px;
  right: 16px;
  min-height: 32px;
  border-color: var(--ds-border);
  border-radius: var(--ds-radius-control);
  background: var(--ds-surface);
  box-shadow: var(--ds-shadow-surface);
  padding: 4px 8px;
}

#page-honors .showcase-record-card {
  grid-template-columns: minmax(180px, .82fr) minmax(220px, 1.18fr);
  gap: 18px;
  padding: 14px;
}

#page-honors .showcase-story-cover {
  aspect-ratio: 16 / 10;
}

#page-honors .showcase-story-cover .showcase-media-item,
#page-honors .showcase-story-cover .showcase-media-item img,
#page-honors .showcase-story-cover .showcase-media-item video {
  width: 100%;
  height: 100%;
}

#page-honors .showcase-story-cover .showcase-media-item img,
#page-honors .showcase-story-cover .showcase-media-item video {
  object-fit: cover;
}

#page-honors .showcase-story-content {
  gap: 11px;
}

#page-honors .showcase-story-meta > span,
#page-honors .showcase-story-facts > span {
  color: var(--ds-text-muted);
  font-size: 13px;
}

#page-honors .showcase-story-result {
  margin: 0;
  -webkit-line-clamp: 4;
}

#page-honors .showcase-story-facts {
  border-top: 1px solid var(--ds-border);
  padding-top: 10px;
}

#page-honors .showcase-detail-gallery {
  gap: 12px;
}

#page-honors .showcase-media-item img,
#page-honors .showcase-media-item video {
  border-radius: var(--ds-radius-nested);
}

#page-honors .achievement-detail-drawer {
  width: min(780px, calc(100vw - 32px));
  max-height: calc(100vh - 20px);
  border-radius: var(--ds-radius-modal) 0 0 var(--ds-radius-modal);
  box-shadow: var(--ds-shadow-modal);
}

#page-honors .achievement-detail-body {
  gap: 20px;
}

#page-honors .achievement-detail-hero .certificate-frame {
  max-height: 420px;
  border-radius: var(--ds-radius-nested);
}

#page-honors .achievement-detail-facts {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--ds-border);
  border-bottom: 1px solid var(--ds-border);
}

#page-honors .achievement-detail-facts article,
#page-honors .achievement-sensitive-summary > div {
  gap: 6px;
  border: 0;
  border-right: 1px solid var(--ds-border);
  border-radius: 0;
  background: transparent;
  padding: 12px 14px;
}

#page-honors .achievement-detail-facts article:last-child,
#page-honors .achievement-sensitive-summary > div:last-child {
  border-right: 0;
}

#page-honors .achievement-detail-facts span,
#page-honors .achievement-sensitive-summary span,
#page-honors .achievement-story-section > span {
  color: var(--ds-text-muted);
  font-size: 13px;
}

#page-honors .achievement-detail-facts strong,
#page-honors .achievement-sensitive-summary strong {
  color: var(--ds-text-secondary);
  font-size: 14px;
}

#page-honors .achievement-story-section {
  gap: 8px;
  border-left: 3px solid var(--ds-brand-border);
  padding-left: 15px;
}

#page-honors .achievement-story-section p {
  color: var(--ds-text-secondary);
  font-size: 14px;
  line-height: 1.75;
}

#page-honors .achievement-sensitive-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--ds-border);
  border-bottom: 1px solid var(--ds-border);
}

#page-honors .achievement-association-groups {
  gap: 14px;
  border-top: 1px solid var(--ds-border);
  padding-top: 15px;
}

#page-honors .achievement-association-groups > div {
  gap: 8px;
}

#page-honors .achievement-association-groups strong {
  color: var(--ds-text-secondary);
  font-size: 13px;
}

#page-honors .achievement-association-groups p span {
  border: 1px solid var(--ds-border);
  background: var(--ds-surface-subtle);
  color: var(--ds-text-secondary);
  padding: 5px 9px;
}

#page-honors .achievement-detail-empty {
  border-color: var(--ds-border-strong);
  border-radius: var(--ds-radius-nested);
  background: var(--ds-surface-subtle);
  color: var(--ds-text-muted);
  padding: 16px;
}

#page-honors .achievement-detail-empty strong {
  color: var(--ds-text-secondary);
}

#page-honors .achievement-editor-modal,
#page-honors .achievement-editor-body,
#page-honors .achievement-sensitive-fields,
#page-honors .achievement-link-editor,
#page-honors .achievement-media-editor {
  border-color: var(--ds-border);
}

#page-honors .achievement-sensitive-fields,
#page-honors .achievement-link-editor,
#page-honors .achievement-media-editor {
  border-radius: var(--ds-radius-nested);
  background: var(--ds-surface-subtle);
}

@media (max-width: 1180px) {
  #page-honors .achievement-toolbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #page-honors .achievement-search-field {
    grid-column: span 2;
  }

  #page-honors .achievement-toolbar > button {
    grid-column: auto;
  }

  #page-honors .achievement-overview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #page-honors .achievement-overview article:nth-child(3n) {
    border-right: 0;
  }

  #page-honors .achievement-overview article:last-child {
    border-right: 0;
  }

  #page-honors .achievement-overview article:nth-child(n + 4) {
    border-top: 1px solid var(--ds-border);
  }

  #page-honors .showcase-record-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  #page-honors {
    gap: 18px;
  }

  #page-honors .achievement-page-heading,
  #page-honors .achievement-batch-bar {
    align-items: stretch;
    flex-direction: column;
  }

  #page-honors .achievement-page-heading .page-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  #page-honors .achievement-page-heading .page-actions .primary {
    grid-column: 1 / -1;
  }

  #page-honors .achievement-overview {
    grid-template-columns: 1fr 1fr;
  }

  #page-honors .achievement-overview .achievement-overview-main {
    grid-column: 1 / -1;
    border-right: 0;
  }

  #page-honors .achievement-overview article {
    border-right: 1px solid var(--ds-border);
  }

  #page-honors .achievement-overview article:nth-child(2n) {
    border-right: 0;
  }

  #page-honors .achievement-overview article:last-child {
    border-right: 0;
  }

  #page-honors .achievement-overview article:nth-child(n + 3) {
    border-top: 1px solid var(--ds-border);
  }

  #page-honors .achievement-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  #page-honors .achievement-search-field {
    grid-column: 1 / -1;
  }

  #page-honors .achievement-toolbar > button {
    grid-column: 1 / -1;
  }

  #page-honors .honor-section-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #page-honors .achievement-detail-drawer {
    width: 100%;
    max-height: min(92vh, 860px);
    margin: auto 0 0;
    border-radius: var(--ds-radius-modal) var(--ds-radius-modal) 0 0;
  }

  #page-honors .achievement-detail-facts,
  #page-honors .achievement-sensitive-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #page-honors .achievement-detail-facts article:nth-child(2n),
  #page-honors .achievement-sensitive-summary > div:nth-child(2n) {
    border-right: 0;
  }

  #page-honors .achievement-detail-facts article:nth-child(n + 3),
  #page-honors .achievement-sensitive-summary > div:nth-child(n + 3) {
    border-top: 1px solid var(--ds-border);
  }

  #page-honors .achievement-card-actions,
  #page-honors .honor-manage-mode .achievement-card-actions {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 480px) {
  #page-honors .achievement-overview article {
    border-right: 0;
    border-top: 1px solid var(--ds-border);
  }

  #page-honors .achievement-overview article:first-child {
    border-top: 0;
  }

  #page-honors .achievement-overview article {
    padding: 14px;
  }

  #page-honors .achievement-overview article > strong {
    font-size: 24px;
  }

  #page-honors .honor-section-grid {
    grid-template-columns: 1fr;
  }

  #page-honors .achievement-toolbar {
    grid-template-columns: 1fr;
  }

  #page-honors .achievement-search-field,
  #page-honors .achievement-toolbar > button {
    grid-column: auto;
  }

  #page-honors .achievement-page-heading .page-actions {
    grid-template-columns: 1fr;
  }

  #page-honors .achievement-page-heading .page-actions .primary {
    grid-column: auto;
  }

  #page-honors .achievement-detail-facts,
  #page-honors .achievement-sensitive-summary {
    grid-template-columns: 1fr;
  }

  #page-honors .achievement-detail-facts article,
  #page-honors .achievement-sensitive-summary > div {
    border-right: 0;
    border-top: 1px solid var(--ds-border);
  }

  #page-honors .achievement-detail-facts article:first-child,
  #page-honors .achievement-sensitive-summary > div:first-child {
    border-top: 0;
  }
}

#page-annual {
  max-width: 1320px;
  padding-top: clamp(20px, 2.4vw, 32px);
  padding-bottom: clamp(44px, 5vw, 72px);
}

#page-annual .annual-page-heading {
  min-height: 0;
  margin-bottom: 22px;
  padding-top: 0;
  text-align: left;
}

#page-annual .annual-page-heading h2 {
  font-size: var(--ds-font-size-page-title);
}

#page-annual .annual-page-heading .page-actions {
  position: static;
  top: auto;
  right: auto;
  margin-top: 0;
}

#page-annual .annual-tabs {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 26px;
  border-bottom: 1px solid var(--ds-border);
}

#page-annual .annual-tabs button {
  grid-template-columns: 28px minmax(0, 1fr);
  min-height: 58px;
  gap: 9px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--ds-text-muted);
  padding: 9px 12px 10px 0;
  box-shadow: none;
}

#page-annual .annual-tabs button:hover,
#page-annual .annual-tabs button:focus-visible {
  border-bottom-color: var(--ds-border-strong);
  background: transparent;
  color: var(--ds-text-secondary);
  box-shadow: none;
}

#page-annual .annual-tabs button.active {
  border-bottom-color: var(--ds-brand);
  background: transparent;
  color: var(--ds-brand-strong);
  box-shadow: none;
}

#page-annual .annual-tab-code {
  width: 26px;
  height: 26px;
  border: 1px solid var(--ds-border-strong);
  border-radius: 50%;
  background: var(--ds-surface);
  color: var(--ds-text-muted);
  font-size: 11px;
}

#page-annual .annual-tabs button.active .annual-tab-code {
  border-color: var(--ds-brand);
  background: var(--ds-brand);
  color: var(--ds-on-brand);
}

#page-annual .annual-tabs strong {
  color: var(--ds-text-secondary);
  font-size: 14px;
}

#page-annual .annual-tabs button.active strong {
  color: var(--ds-brand-strong);
}

#page-annual .annual-tabs small {
  margin-top: 2px;
  color: var(--ds-text-muted);
  font-size: 12px;
}

#page-annual .annual-content {
  min-height: 0;
}

#page-annual .annual-overview-page,
#page-annual .annual-auto-review-page,
#page-annual .annual-planning-board {
  gap: 24px;
}

#page-annual .panel {
  border-color: var(--ds-border);
  border-radius: var(--ds-radius-surface);
  box-shadow: none;
}

#page-annual .panel-head {
  margin-bottom: 18px;
}

#page-annual .panel-head h2 {
  color: var(--ds-text);
  font-size: var(--ds-font-size-section-title);
}

#page-annual .panel-head span {
  color: var(--ds-text-muted);
  font-size: 13px;
  line-height: 1.55;
}

#page-annual .annual-board-kicker {
  margin-bottom: 5px;
  color: var(--ds-brand-strong);
  font-size: 11px;
  letter-spacing: .1em;
}

#page-annual .annual-overview-page {
  display: flex;
  flex-direction: column;
}

#page-annual .annual-phase-summary {
  order: 1;
  grid-template-columns: minmax(0, 1.45fr) minmax(240px, .72fr) minmax(170px, auto);
  gap: 24px;
  border-left: 3px solid var(--ds-brand);
  padding: 22px 24px;
}

#page-annual .annual-phase-summary h2 {
  margin: 4px 0 7px;
  color: var(--ds-text);
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.2;
}

#page-annual .annual-phase-summary p {
  max-width: 680px;
  color: var(--ds-text-secondary);
  font-size: 14px;
  line-height: 1.65;
}

#page-annual .annual-phase-facts {
  gap: 5px;
  border-left-color: var(--ds-border);
  padding-left: 24px;
}

#page-annual .annual-phase-facts span,
#page-annual .annual-phase-facts small {
  color: var(--ds-text-muted);
  font-size: 13px;
  line-height: 1.5;
}

#page-annual .annual-phase-facts strong {
  color: var(--ds-brand-strong);
  font-size: 20px;
}

#page-annual .annual-phase-select {
  display: grid;
  gap: 7px;
  color: var(--ds-text-secondary);
  font-size: 13px;
  font-weight: 700;
}

#page-annual .annual-key-metrics {
  order: 2;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--ds-border);
  border-bottom: 1px solid var(--ds-border);
}

#page-annual .annual-key-metrics article {
  min-height: 92px;
  align-content: center;
  gap: 5px;
  border: 0;
  border-right: 1px solid var(--ds-border);
  border-radius: 0;
  background: transparent;
  padding: 16px 20px;
}

#page-annual .annual-key-metrics article:last-child {
  border-right: 0;
}

#page-annual .annual-key-metrics article:nth-child(2) {
  background: var(--ds-brand-soft);
}

#page-annual .annual-key-metrics span {
  color: var(--ds-text-muted);
  font-size: 13px;
}

#page-annual .annual-key-metrics strong {
  color: var(--ds-text);
  font-size: 26px;
  line-height: 1.1;
}

#page-annual .annual-key-metrics article:nth-child(2) strong {
  color: var(--ds-brand-strong);
}

#page-annual .annual-key-metrics small {
  color: var(--ds-text-muted);
  font-size: 12px;
}

#page-annual .annual-horizon-board {
  order: 3;
}

#page-annual .annual-objective-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

#page-annual .annual-objective-head-actions > span {
  color: var(--ds-text-muted);
  font-size: 13px;
  white-space: nowrap;
}

#page-annual .annual-objective-cards {
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--ds-border);
}

#page-annual .annual-objective-cards > article {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 18px;
  border: 0;
  border-bottom: 1px solid var(--ds-border);
  border-radius: 0;
  background: transparent;
  padding: 15px 0;
}

#page-annual .annual-objective-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

#page-annual .annual-objective-copy > strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ds-text-secondary);
  font-size: 14px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

#page-annual .annual-objective-copy > small {
  color: var(--ds-text-muted);
  font-size: 12px;
  line-height: 1.5;
}

#page-annual .annual-objective-check {
  display: inline-flex;
  justify-self: end;
  align-items: center;
  gap: 10px;
  min-width: 148px;
  border: 1px solid var(--ds-border);
  border-radius: 999px;
  background: var(--ds-surface-subtle);
  color: var(--ds-text-secondary);
  cursor: pointer;
  padding: 8px 12px 8px 8px;
  box-shadow: none;
  transition: border-color .16s ease, background-color .16s ease, color .16s ease;
}

#page-annual .annual-objective-check:hover,
#page-annual .annual-objective-check:focus-visible {
  border-color: color-mix(in srgb, var(--ds-brand) 35%, var(--ds-border));
  background: var(--ds-brand-soft);
}

#page-annual .annual-objective-check > i {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--ds-border-strong);
  border-radius: 50%;
  background: var(--ds-surface);
  color: var(--ds-text-muted);
  font-size: 15px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
}

#page-annual .annual-objective-check > span {
  display: grid;
  gap: 1px;
  text-align: left;
}

#page-annual .annual-objective-check strong {
  color: var(--ds-text-secondary);
  font-size: 13px;
  line-height: 1.2;
}

#page-annual .annual-objective-check small {
  color: var(--ds-text-muted);
  font-size: 12px;
}

#page-annual .annual-objective-check.active {
  border-color: color-mix(in srgb, var(--ds-brand) 28%, var(--ds-border));
  background: var(--ds-brand-soft);
}

#page-annual .annual-objective-check.active > i {
  border-color: var(--ds-brand);
  background: var(--ds-brand);
  color: #fff;
}

#page-annual .annual-objective-check.completed {
  border-color: color-mix(in srgb, var(--ds-success) 30%, var(--ds-border));
  background: var(--ds-success-soft);
}

#page-annual .annual-objective-check.completed > i {
  border-color: var(--ds-success);
  background: var(--ds-success);
  color: #fff;
}

#page-annual .annual-horizon-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

#page-annual .annual-horizon-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--ds-border);
  border-top: 3px solid var(--ds-brand);
  border-radius: 14px;
  background: var(--ds-surface);
}

#page-annual .annual-horizon-panel.is-short {
  border-top-color: color-mix(in srgb, var(--ds-brand) 52%, var(--ds-border-strong));
}

#page-annual .annual-horizon-panel > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--ds-border);
  background: var(--ds-surface-subtle);
  padding: 16px 18px;
}

#page-annual .annual-horizon-panel > header > div:first-child {
  min-width: 0;
}

#page-annual .annual-horizon-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--ds-brand-strong);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
}

#page-annual .annual-horizon-panel h3 {
  margin: 0;
  color: var(--ds-text);
  font-size: 17px;
  line-height: 1.35;
}

#page-annual .annual-horizon-panel p {
  margin: 4px 0 0;
  color: var(--ds-text-muted);
  font-size: 12px;
  line-height: 1.55;
}

#page-annual .annual-horizon-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

#page-annual .annual-horizon-actions > span {
  color: var(--ds-text-muted);
  font-size: 12px;
  white-space: nowrap;
}

#page-annual .annual-horizon-plan-list {
  display: grid;
  padding: 0 18px;
}

#page-annual .annual-horizon-plan-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  border-bottom: 1px solid var(--ds-border);
  padding: 12px 0;
}

#page-annual .annual-horizon-plan-row:last-child {
  border-bottom: 0;
}

#page-annual .annual-horizon-plan-index {
  color: var(--ds-brand-strong);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}

#page-annual .annual-horizon-plan-row > div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

#page-annual .annual-horizon-plan-row > div > strong {
  color: var(--ds-text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

#page-annual .annual-horizon-check {
  min-width: 112px;
  padding-top: 6px;
  padding-bottom: 6px;
}

#page-annual .annual-horizon-check > i {
  width: 24px;
  height: 24px;
}

#page-annual .annual-horizon-empty {
  display: grid;
  min-height: 168px;
  place-content: center;
  justify-items: center;
  gap: 7px;
  padding: 24px;
  text-align: center;
}

#page-annual .annual-horizon-empty strong {
  color: var(--ds-text-secondary);
  font-size: 14px;
}

#page-annual .annual-horizon-empty span {
  max-width: 260px;
  color: var(--ds-text-muted);
  font-size: 12px;
  line-height: 1.55;
}

#page-annual .annual-horizon-empty button {
  margin-top: 5px;
}

#page-annual .annual-horizon-editor {
  border: 0;
  border-radius: 0;
  padding: 14px;
}

#page-annual .annual-horizon-editor .annual-edit-table {
  width: 100%;
  min-width: 360px;
  table-layout: fixed;
}

#page-annual .annual-horizon-editor .annual-edit-table th:last-child,
#page-annual .annual-horizon-editor .annual-edit-table td:last-child {
  width: 86px;
}

#page-annual .annual-horizon-editor input {
  width: 100%;
  min-width: 0;
}

#page-annual .annual-stage-board {
  order: 4;
  padding: 22px 24px;
}

#page-annual .annual-stage-board .annual-phase-timeline {
  position: relative;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  padding-top: 13px;
}

#page-annual .annual-stage-board .annual-phase-timeline::before {
  position: absolute;
  top: 19px;
  right: 8%;
  left: 8%;
  height: 1px;
  background: var(--ds-border-strong);
  content: "";
}

#page-annual .annual-stage-board .annual-phase-step {
  min-height: 176px;
  align-content: start;
  gap: 10px;
  border: 0;
  border-top: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  padding: 24px 14px 4px;
  box-shadow: none;
}

#page-annual .annual-stage-board .annual-phase-step::before {
  display: block;
  top: 0;
  left: 14px;
  width: 12px;
  height: 12px;
  border: 3px solid var(--ds-surface);
  background: var(--ds-border-strong);
  box-shadow: 0 0 0 1px var(--ds-border-strong);
}

#page-annual .annual-stage-board .annual-phase-step.active {
  border-top-color: var(--ds-brand);
  border-radius: var(--ds-radius-nested);
  background: var(--ds-brand-soft);
  box-shadow: none;
}

#page-annual .annual-stage-board .annual-phase-step.active::before {
  background: var(--ds-brand);
  box-shadow: 0 0 0 1px var(--ds-brand);
}

#page-annual .annual-stage-board .annual-phase-step.completed::before {
  background: var(--ds-success);
  box-shadow: 0 0 0 1px var(--ds-success);
}

#page-annual .annual-stage-board .annual-phase-step.overdue {
  border-top-color: var(--ds-danger);
  background: var(--ds-danger-soft);
}

#page-annual .annual-stage-board .annual-phase-step.overdue::before {
  background: var(--ds-danger);
  box-shadow: 0 0 0 1px var(--ds-danger);
}

#page-annual .annual-stage-board .annual-phase-step > div {
  padding-left: 0;
}

#page-annual .annual-stage-board .annual-phase-step > div:first-child {
  display: grid;
  justify-content: stretch;
  gap: 3px;
}

#page-annual .annual-stage-board .annual-phase-step > div:first-child strong {
  color: var(--ds-text);
  font-size: 15px;
}

#page-annual .annual-stage-board .annual-phase-step > div:first-child span,
#page-annual .annual-stage-board .annual-phase-step > small {
  color: var(--ds-text-muted);
  font-size: 12px;
  line-height: 1.5;
}

#page-annual .annual-phase-step-status > strong {
  color: var(--ds-text-secondary);
  font-size: 17px;
}

#page-annual .annual-phase-step.doing .annual-phase-step-status > strong,
#page-annual .annual-phase-step.active .annual-phase-step-status > strong {
  color: var(--ds-brand-strong);
}

#page-annual .annual-phase-step.completed .annual-phase-step-status > strong {
  color: var(--ds-success);
}

#page-annual .annual-phase-step.overdue .annual-phase-step-status > strong {
  color: var(--ds-danger);
}

#page-annual .annual-stage-board .annual-phase-step p {
  color: var(--ds-text-secondary);
  font-size: 13px;
  line-height: 1.55;
  -webkit-line-clamp: 4;
}

#page-annual .annual-goal-progress {
  height: 6px;
  background: var(--ds-surface-muted);
}

#page-annual .annual-stage-board .annual-goal-progress > div,
#page-annual .annual-objective-card .annual-goal-progress > div {
  background: var(--ds-brand);
}

#page-annual .annual-calendar-board {
  order: 5;
  padding: 22px 24px 26px;
}

#page-annual .annual-calendar-toolbar {
  align-items: flex-end;
}

#page-annual .annual-calendar-toolbar h2 {
  margin: 4px 0 6px;
  font-size: var(--ds-font-size-section-title);
}

#page-annual .annual-calendar-toolbar p {
  max-width: 720px;
  color: var(--ds-text-muted);
  font-size: 13px;
  line-height: 1.55;
}

#page-annual .annual-calendar-actions {
  align-items: center;
  gap: 7px;
}

#page-annual .annual-calendar-actions > button,
#page-annual .annual-calendar-actions > .annual-calendar-month-picker {
  box-sizing: border-box;
  height: 40px;
  min-height: 40px;
  margin: 0;
}

#page-annual .annual-calendar-actions > .annual-calendar-month-picker {
  width: 154px;
}

#page-annual .annual-calendar-actions button {
  min-height: 36px;
  border-color: transparent;
  background: transparent;
  color: var(--ds-text-muted);
  box-shadow: none;
}

#page-annual .annual-calendar-actions button:hover,
#page-annual .annual-calendar-actions button:focus-visible {
  border-color: var(--ds-border);
  background: var(--ds-surface-subtle);
  color: var(--ds-text-secondary);
}

#page-annual .annual-calendar-actions button.active {
  border-color: var(--ds-brand-border);
  background: var(--ds-brand-soft);
  color: var(--ds-brand-strong);
}

#page-annual .annual-calendar-filters {
  gap: 12px;
  margin-top: 18px;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-nested);
  background: var(--ds-surface-subtle);
  padding: 12px 14px;
}

#page-annual .annual-calendar-filters label,
#page-annual .annual-calendar-actions label,
#page-annual .annual-event-form > label,
#page-annual .annual-weekly-plan-form > label,
#page-annual .annual-temporary-task-form > label {
  color: var(--ds-text-secondary);
  font-size: 13px;
}

#page-annual .annual-year-calendar {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 12px;
  margin-top: 28px;
}

#page-annual .annual-year-calendar > article {
  position: relative;
  border-color: var(--ds-border);
  border-radius: var(--ds-radius-nested);
  background: var(--ds-surface);
  padding: 12px;
  box-shadow: none;
}

#page-annual .annual-year-calendar > article:nth-child(3n + 1)::before {
  position: absolute;
  top: -18px;
  left: 2px;
  color: var(--ds-text-faint);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}

#page-annual .annual-year-calendar > article:nth-child(1)::before { content: "Q1"; }
#page-annual .annual-year-calendar > article:nth-child(4)::before { content: "Q2"; }
#page-annual .annual-year-calendar > article:nth-child(7)::before { content: "Q3"; }
#page-annual .annual-year-calendar > article:nth-child(10)::before { content: "Q4"; }

#page-annual .annual-year-calendar > article.is-current-month {
  border-color: var(--ds-brand-border);
  box-shadow: inset 3px 0 0 var(--ds-brand);
}

#page-annual .annual-year-calendar > article.is-selected-month > button {
  border-radius: 8px;
  background: var(--ds-brand-soft);
  padding-right: 8px;
  padding-left: 8px;
}

#page-annual .annual-year-calendar > article > button strong {
  color: var(--ds-text-secondary);
  font-size: 14px;
}

#page-annual .annual-year-calendar > article.is-current-month > button strong {
  color: var(--ds-brand-strong);
}

#page-annual .annual-year-calendar > article > button small {
  color: var(--ds-text-muted);
  font-size: 12px;
}

#page-annual .annual-mini-week {
  margin-bottom: 5px;
  color: var(--ds-text-muted);
  font-size: 11px;
}

#page-annual .annual-mini-days > span,
#page-annual .annual-mini-days > button,
#page-annual .annual-year-calendar .annual-mini-days > button {
  min-height: 28px;
  border-radius: 7px;
  color: var(--ds-text-secondary);
}

#page-annual .annual-mini-days b {
  font-size: 11px;
}

#page-annual .annual-mini-days .has-task {
  background: var(--ds-brand-soft);
  color: var(--ds-brand-strong);
}

#page-annual .annual-mini-days .partial {
  background: var(--ds-warning-soft);
  color: var(--ds-warning);
}

#page-annual .annual-mini-days .complete {
  background: var(--ds-success-soft);
  color: var(--ds-success);
}

#page-annual .annual-mini-days .selected {
  border-color: var(--ds-brand);
  background: var(--ds-brand-soft);
  box-shadow: inset 0 0 0 1px var(--ds-brand);
}

#page-annual .annual-month-calendar-layout {
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, .7fr);
  gap: 24px;
  margin-top: 20px;
}

#page-annual .annual-month-calendar {
  border-color: var(--ds-border);
  border-radius: var(--ds-radius-nested);
  padding: 18px;
}

#page-annual .annual-date-agenda {
  gap: 14px;
}

#page-annual .annual-date-agenda > div:first-child span,
#page-annual .annual-date-agenda > div:first-child small {
  color: var(--ds-text-muted);
  font-size: 13px;
}

#page-annual .annual-date-agenda > div:first-child strong {
  font-size: 20px;
}

#page-annual .annual-date-event-list {
  gap: 0;
  border-top: 1px solid var(--ds-border);
}

#page-annual .annual-date-event-list > article {
  grid-template-columns: 4px minmax(0, 1fr) auto;
  gap: 11px;
  border: 0;
  border-bottom: 1px solid var(--ds-border);
  border-radius: 0;
  padding: 12px 0;
}

#page-annual .annual-date-event-list article > i {
  width: 4px;
  height: 34px;
  background: var(--ds-brand);
}

#page-annual .annual-date-event-list strong {
  color: var(--ds-text-secondary);
  font-size: 14px;
}

#page-annual .annual-date-event-list small {
  margin-top: 4px;
  color: var(--ds-text-muted);
  font-size: 12px;
}

#page-annual .annual-create-details {
  border-top-color: var(--ds-border);
  padding-top: 14px;
}

#page-annual .annual-create-details summary {
  color: var(--ds-brand-strong);
  font-size: 13px;
}

#page-annual .annual-empty-action {
  min-height: 150px;
  gap: 8px;
  border-color: var(--ds-border-strong);
  border-radius: var(--ds-radius-nested);
  background: var(--ds-surface-subtle);
  color: var(--ds-text-muted);
  padding: 24px;
}

#page-annual .annual-empty-action strong {
  color: var(--ds-text-secondary);
  font-size: 16px;
}

#page-annual .annual-empty-action span {
  max-width: 560px;
  font-size: 13px;
  line-height: 1.6;
}

#page-annual .annual-week-schedule-board,
#page-annual .annual-checkin-calendar,
#page-annual .annual-today-checklist,
#page-annual .annual-review-periods,
#page-annual .annual-review-stats-panel,
#page-annual .annual-ai-review-panel,
#page-annual .annual-year-auto-summary,
#page-annual .annual-review-history {
  padding: 22px 24px;
}

#page-annual .annual-week-table {
  margin-top: 20px;
  border-color: var(--ds-border);
  border-radius: var(--ds-radius-nested);
}

#page-annual .annual-week-table-head {
  background: var(--ds-surface-subtle);
}

#page-annual .annual-week-table-head span,
#page-annual .annual-week-table-head strong,
#page-annual .annual-week-table-row > strong {
  color: var(--ds-text-muted);
  font-size: 12px;
}

#page-annual .annual-week-table-row article {
  border-left-color: var(--ds-brand);
  background: var(--ds-brand-soft);
}

#page-annual .annual-week-table-row article span {
  color: var(--ds-text-secondary);
  font-size: 12px;
}

#page-annual .annual-week-table-row article small,
#page-annual .annual-week-legend {
  color: var(--ds-text-muted);
  font-size: 11px;
}

#page-annual .annual-workspace-os > .annual-life-os-head {
  border-bottom-color: var(--ds-border);
  padding-bottom: 16px;
}

#page-annual .annual-life-os-head h2,
#page-annual .annual-today-checklist-head h2,
#page-annual .annual-review-periods h2 {
  color: var(--ds-text);
  font-size: var(--ds-font-size-section-title);
}

#page-annual .annual-life-os-head p,
#page-annual .annual-today-checklist-head p,
#page-annual .annual-review-periods p {
  color: var(--ds-text-muted);
  font-size: 13px;
  line-height: 1.55;
}

#page-annual .annual-workspace-layout,
#page-annual.annual-fixed-scroll .annual-workspace-layout {
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 24px;
}

#page-annual .annual-workspace-rail {
  top: calc(var(--ds-topbar-height) + 18px);
  gap: 4px;
  border: 0;
  border-right: 1px solid var(--ds-border);
  border-radius: 0;
  background: transparent;
  padding: 0 18px 0 0;
}

#page-annual .annual-workspace-rail-head {
  padding: 2px 4px 10px;
}

#page-annual .annual-workspace-rail-head span {
  color: var(--ds-text-secondary);
  font-size: 13px;
}

#page-annual .annual-workspace-nav-card {
  gap: 7px;
  border: 0;
  border-left: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  padding: 11px 8px 11px 12px;
  box-shadow: none;
}

#page-annual .annual-workspace-nav-card:hover,
#page-annual .annual-workspace-nav-card:focus,
#page-annual .annual-workspace-nav-card.active {
  border-left-color: var(--ds-brand);
  background: var(--ds-brand-soft);
  box-shadow: none;
}

#page-annual .annual-workspace-nav-head {
  grid-template-columns: minmax(0, 1fr) auto;
}

#page-annual .annual-workspace-nav-head > span {
  display: none;
}

#page-annual .annual-workspace-nav-head strong {
  color: var(--ds-text-secondary);
  font-size: 13px;
}

#page-annual .annual-workspace-nav-head small {
  color: var(--ds-text-muted);
  font-size: 11px;
}

#page-annual .annual-workspace-nav-head > b {
  color: var(--ds-text-secondary);
  font-size: 13px;
}

#page-annual .annual-workspace-nav-meta {
  grid-template-columns: 1fr;
  gap: 3px;
}

#page-annual .annual-workspace-nav-meta span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 2px 0;
}

#page-annual .annual-workspace-nav-card > button {
  min-height: 30px;
  border-color: transparent;
  background: transparent;
  color: var(--ds-text-muted);
}

#page-annual .annual-workspace-nav-card > button.active {
  border-color: transparent;
  background: transparent;
  color: var(--ds-brand-strong);
}

#page-annual.annual-fixed-scroll .annual-workspace-detail {
  padding-right: 0;
  padding-left: 0;
}

#page-annual .annual-domain-detail-head {
  align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ds-border);
}

#page-annual .annual-domain-detail-head span {
  color: var(--ds-text-muted);
  font-size: 11px;
}

#page-annual .annual-domain-detail-head strong {
  color: var(--ds-text);
  font-size: 18px;
}

#page-annual .annual-workspace-tabs {
  gap: 0;
  border-bottom: 1px solid var(--ds-border);
  border-radius: 0;
  background: transparent;
  padding: 0;
}

#page-annual .annual-workspace-tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--ds-text-muted);
  box-shadow: none;
}

#page-annual .annual-workspace-tabs button.active {
  border-bottom-color: var(--ds-brand);
  background: transparent;
  color: var(--ds-brand-strong);
}

#page-annual .annual-daily-workspace {
  grid-template-columns: minmax(330px, .72fr) minmax(0, 1.28fr);
  gap: 24px;
}

#page-annual .annual-checkin-days > button {
  min-height: 58px;
  border-color: transparent;
  border-radius: 9px;
  background: var(--ds-surface);
  color: var(--ds-text-secondary);
}

#page-annual .annual-checkin-days > button.selected {
  border-color: var(--ds-brand);
  background: var(--ds-brand-soft);
  color: var(--ds-brand-strong);
}

#page-annual .annual-checkin-days > button.complete {
  border-color: var(--ds-success-border);
  background: var(--ds-success-soft);
  color: var(--ds-success);
}

#page-annual .annual-checkin-days > button.complete > b {
  border: 0;
  border-radius: 0;
  padding: 0;
  transform: none;
}

#page-annual .annual-checkin-days > button.partial {
  background: var(--ds-warning-soft);
  color: var(--ds-warning);
}

#page-annual .annual-checkin-days > button.overdue {
  background: var(--ds-danger-soft);
  color: var(--ds-danger);
}

#page-annual .annual-checkin-legend {
  color: var(--ds-text-muted);
  font-size: 12px;
}

#page-annual .annual-checkin-stamp {
  min-width: 118px;
  min-height: 58px;
  border: 1px solid var(--ds-border-strong);
  border-radius: var(--ds-radius-nested);
  color: var(--ds-text-muted);
  padding: 9px 12px;
  transform: none;
}

#page-annual .annual-checkin-stamp.complete {
  border-color: var(--ds-success-border);
  background: var(--ds-success-soft);
  color: var(--ds-success);
}

#page-annual .annual-checkin-stamp.partial {
  border-color: var(--ds-warning-border);
  background: var(--ds-warning-soft);
  color: var(--ds-warning);
}

#page-annual .annual-checkin-stamp strong {
  font-size: 17px;
}

#page-annual .annual-checkin-stamp span {
  font-size: 12px;
}

#page-annual .annual-grouped-task-list {
  gap: 18px;
  margin-top: 20px;
}

#page-annual .annual-grouped-task-list > section {
  border: 0;
  border-top: 1px solid var(--ds-border);
  border-radius: 0;
}

#page-annual .annual-grouped-task-list section > header {
  background: transparent;
  padding: 11px 0 8px;
}

#page-annual .annual-grouped-task-list section > header strong {
  color: var(--ds-text-secondary);
  font-size: 13px;
}

#page-annual .annual-grouped-task-list section > header span {
  color: var(--ds-text-muted);
  font-size: 12px;
}

#page-annual .annual-grouped-task-list article {
  grid-template-columns: 30px minmax(0, 1fr) auto 30px;
  gap: 11px;
  border-top-color: var(--ds-border);
  background: transparent;
  padding: 12px 0;
}

#page-annual .annual-grouped-task-list article.done {
  background: var(--ds-success-soft);
}

#page-annual .annual-grouped-task-list article > div strong {
  color: var(--ds-text-secondary);
  font-size: 14px;
}

#page-annual .annual-grouped-task-list article > div small {
  margin-top: 4px;
  color: var(--ds-text-muted);
  font-size: 12px;
}

#page-annual .annual-grouped-task-list article > span {
  font-size: 11px;
}

#page-annual .annual-task-check {
  border-color: var(--ds-border-strong);
  border-radius: 50%;
}

#page-annual .annual-review-periods {
  gap: 24px;
}

#page-annual .annual-review-periods nav {
  grid-template-columns: repeat(6, minmax(42px, 1fr));
  gap: 5px;
}

#page-annual .annual-review-periods nav button {
  min-height: 34px;
  border-color: transparent;
  background: transparent;
  color: var(--ds-text-muted);
}

#page-annual .annual-review-periods nav button.active {
  border-color: var(--ds-brand-border);
  background: var(--ds-brand-soft);
  color: var(--ds-brand-strong);
}

#page-annual .annual-auto-review-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(330px, .9fr);
  gap: 24px;
}

#page-annual .annual-review-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--ds-border);
  border-bottom: 1px solid var(--ds-border);
}

#page-annual .annual-review-metrics article {
  gap: 4px;
  border: 0;
  border-right: 1px solid var(--ds-border);
  border-radius: 0;
  background: transparent;
  padding: 12px;
}

#page-annual .annual-review-metrics article:nth-child(3n) {
  border-right: 0;
}

#page-annual .annual-review-metrics span {
  color: var(--ds-text-muted);
  font-size: 12px;
}

#page-annual .annual-review-metrics strong {
  color: var(--ds-text-secondary);
  font-size: 18px;
}

#page-annual .annual-domain-rate-list > div {
  grid-template-columns: 112px minmax(0, 1fr) 44px;
  gap: 10px;
}

#page-annual .annual-domain-rate-list span,
#page-annual .annual-domain-rate-list strong {
  color: var(--ds-text-muted);
  font-size: 12px;
}

#page-annual .annual-domain-rate-list i,
#page-annual .annual-year-trend article i {
  background: var(--ds-surface-muted);
}

#page-annual .annual-domain-rate-list i b,
#page-annual .annual-year-trend article i {
  background: var(--ds-brand);
}

#page-annual .annual-review-radar-grid > article {
  border-color: var(--ds-border);
  border-radius: var(--ds-radius-nested);
  background: var(--ds-surface-subtle);
}

#page-annual .annual-ai-review-content section {
  border-left-color: var(--ds-border-strong);
  border-radius: 0;
  background: transparent;
  padding: 8px 0 8px 14px;
}

#page-annual .annual-ai-review-content section.next-focus {
  border-left-color: var(--ds-brand);
  background: var(--ds-brand-soft);
  padding-right: 12px;
}

#page-annual .annual-ai-review-content section strong {
  color: var(--ds-text-secondary);
  font-size: 13px;
}

#page-annual .annual-ai-review-content section p {
  color: var(--ds-text-muted);
  font-size: 13px;
  line-height: 1.55;
}

#page-annual .annual-year-auto-summary .annual-year-metrics {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--ds-border);
  border-bottom: 1px solid var(--ds-border);
}

#page-annual .annual-year-auto-summary .annual-year-metrics article {
  border: 0;
  border-right: 1px solid var(--ds-border);
  border-radius: 0;
  padding: 13px;
}

#page-annual .annual-year-auto-summary .annual-year-metrics article:last-child {
  border-right: 0;
}

#page-annual .annual-year-trend {
  border-top-color: var(--ds-border);
}

#page-annual .annual-review-history > div:last-child {
  gap: 0;
  border-top: 1px solid var(--ds-border);
}

#page-annual .annual-review-history > div:last-child > article {
  border: 0;
  border-bottom: 1px solid var(--ds-border);
  border-radius: 0;
  background: transparent;
  padding: 13px 0;
}

@media (max-width: 1080px) {
  #page-annual .annual-phase-summary {
    grid-template-columns: minmax(0, 1fr) minmax(220px, .7fr);
  }

  #page-annual .annual-phase-select {
    grid-column: 1 / -1;
  }

  #page-annual .annual-stage-board .annual-phase-timeline {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  #page-annual .annual-stage-board .annual-phase-timeline::before {
    display: none;
  }

  #page-annual .annual-stage-board .annual-phase-step {
    border-top: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-nested);
    padding: 20px 14px 14px;
  }

  #page-annual .annual-stage-board .annual-phase-step::before {
    top: 5px;
  }

  #page-annual .annual-year-auto-summary .annual-year-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #page-annual .annual-year-auto-summary .annual-year-metrics article:nth-child(3n) {
    border-right: 0;
  }

  #page-annual .annual-year-auto-summary .annual-year-metrics article:nth-child(n + 4) {
    border-top: 1px solid var(--ds-border);
  }
}

@media (max-width: 900px) {
  #page-annual .annual-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-bottom: 0;
    gap: 0 12px;
  }

  #page-annual .annual-tabs button {
    border-bottom: 1px solid var(--ds-border);
  }

  #page-annual .annual-tabs button.active {
    border-bottom: 2px solid var(--ds-brand);
  }

  #page-annual .annual-key-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #page-annual .annual-key-metrics article:nth-child(2) {
    border-right: 0;
  }

  #page-annual .annual-key-metrics article:nth-child(n + 3) {
    border-top: 1px solid var(--ds-border);
  }

  #page-annual .annual-year-calendar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #page-annual .annual-year-calendar > article:nth-child(3n + 1)::before {
    display: none;
  }

  #page-annual .annual-month-calendar-layout,
  #page-annual .annual-daily-workspace,
  #page-annual .annual-auto-review-grid {
    grid-template-columns: 1fr;
  }

  #page-annual .annual-workspace-layout,
  #page-annual.annual-fixed-scroll .annual-workspace-layout {
    grid-template-columns: 1fr;
    grid-template-areas: "rail" "stage";
  }

  #page-annual .annual-workspace-rail {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-right: 0;
    border-bottom: 1px solid var(--ds-border);
    padding: 0 0 16px;
  }

  #page-annual .annual-workspace-rail-head {
    grid-column: 1 / -1;
  }

  #page-annual .annual-workspace-nav-card {
    border-left: 0;
    border-top: 2px solid transparent;
    padding: 10px;
  }

  #page-annual .annual-workspace-nav-card.active {
    border-top-color: var(--ds-brand);
  }
}

@media (max-width: 680px) {
  #page-annual {
    padding-top: 18px;
  }

  #page-annual .annual-tabs small {
    display: none;
  }

  #page-annual .annual-tabs button {
    min-height: 50px;
  }

  #page-annual .annual-phase-summary {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 18px;
  }

  #page-annual .annual-phase-facts {
    border-top: 1px solid var(--ds-border);
    border-left: 0;
    padding-top: 14px;
    padding-left: 0;
  }

  #page-annual .annual-objective-board,
  #page-annual .annual-stage-board,
  #page-annual .annual-calendar-board,
  #page-annual .annual-week-schedule-board,
  #page-annual .annual-checkin-calendar,
  #page-annual .annual-today-checklist,
  #page-annual .annual-review-periods,
  #page-annual .annual-review-stats-panel,
  #page-annual .annual-ai-review-panel,
  #page-annual .annual-year-auto-summary,
  #page-annual .annual-review-history {
    padding: 18px;
  }

  #page-annual .annual-objective-cards > article {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 10px;
  }

  #page-annual .annual-objective-copy,
  #page-annual .annual-objective-check {
    grid-column: 1;
    grid-row: auto;
  }

  #page-annual .annual-objective-head-actions {
    justify-content: flex-start;
  }

  #page-annual .annual-objective-check {
    justify-self: start;
    min-width: 0;
  }

  #page-annual .annual-horizon-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  #page-annual .annual-horizon-panel > header {
    flex-direction: column;
    gap: 10px;
  }

  #page-annual .annual-horizon-actions {
    width: 100%;
    justify-content: space-between;
  }

  #page-annual .annual-horizon-plan-row {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  #page-annual .annual-horizon-check {
    grid-column: 2;
    justify-self: start;
  }

  #page-annual .annual-stage-board .annual-phase-timeline {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0 0 0 26px;
  }

  #page-annual .annual-stage-board .annual-phase-timeline::before {
    display: block;
    top: 8px;
    right: auto;
    bottom: 12px;
    left: 8px;
    width: 1px;
    height: auto;
  }

  #page-annual .annual-stage-board .annual-phase-step {
    min-height: 0;
    border: 0;
    border-bottom: 1px solid var(--ds-border);
    border-radius: 0;
    background: transparent;
    padding: 0 0 20px;
  }

  #page-annual .annual-stage-board .annual-phase-step + .annual-phase-step {
    padding-top: 20px;
  }

  #page-annual .annual-stage-board .annual-phase-step.active,
  #page-annual .annual-stage-board .annual-phase-step.overdue {
    margin: 0 -8px 14px;
    border-radius: var(--ds-radius-nested);
    padding: 14px 12px;
  }

  #page-annual .annual-stage-board .annual-phase-step::before {
    top: 3px;
    left: -24px;
  }

  #page-annual .annual-stage-board .annual-phase-step + .annual-phase-step::before {
    top: 23px;
  }

  #page-annual .annual-year-calendar {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  #page-annual .annual-year-calendar > article:nth-child(3n + 1)::before {
    display: block;
  }

  #page-annual .annual-calendar-toolbar,
  #page-annual .annual-review-periods,
  #page-annual .annual-today-checklist-head {
    align-items: stretch;
    flex-direction: column;
  }

  #page-annual .annual-calendar-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  #page-annual .annual-calendar-actions .annual-calendar-month-picker {
    grid-column: 1 / -1;
    min-width: 0;
    width: 100%;
  }

  #page-annual .annual-workspace-rail {
    grid-template-columns: 1fr;
  }

  #page-annual .annual-workspace-nav-card {
    border-top: 0;
    border-left: 2px solid transparent;
  }

  #page-annual .annual-workspace-nav-card.active {
    border-top-color: transparent;
    border-left-color: var(--ds-brand);
  }

  #page-annual .annual-grouped-task-list article {
    grid-template-columns: 30px minmax(0, 1fr) auto;
  }

  #page-annual .annual-task-more {
    grid-column: 3;
  }

  #page-annual .annual-review-periods nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  #page-annual .annual-review-metrics,
  #page-annual .annual-year-auto-summary .annual-year-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #page-annual .annual-review-metrics article,
  #page-annual .annual-year-auto-summary .annual-year-metrics article {
    border-right: 1px solid var(--ds-border);
    border-bottom: 1px solid var(--ds-border);
  }

  #page-annual .annual-review-metrics article:nth-child(2n),
  #page-annual .annual-year-auto-summary .annual-year-metrics article:nth-child(2n) {
    border-right: 0;
  }
}

#page-learning .practice-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, .65fr);
  align-items: stretch;
  gap: 16px;
  margin-bottom: 18px;
}

#page-learning .practice-command-board {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(250px, .75fr) 170px;
  overflow: hidden;
  border-top: 1px solid var(--ds-border);
  border-bottom: 1px solid var(--ds-border);
  border-left: 4px solid var(--ds-brand);
  background: var(--ds-surface);
}

#page-learning .practice-command-board > * {
  min-width: 0;
  padding: 20px 22px;
}

#page-learning .practice-command-board > * + * {
  border-left: 1px solid var(--ds-border);
}

#page-learning .practice-command-primary,
#page-learning .practice-recommendation {
  display: grid;
  align-content: center;
  justify-items: start;
}

#page-learning .practice-command-primary h3,
#page-learning .practice-command-primary p,
#page-learning .practice-recommendation h3,
#page-learning .practice-recommendation p {
  margin: 0;
}

#page-learning .practice-command-primary h3 {
  margin-top: 5px;
  color: var(--ds-text);
  font-size: clamp(20px, 2.4vw, 27px);
  letter-spacing: -0.025em;
  line-height: 1.25;
}

#page-learning .practice-command-primary p {
  margin-top: 7px;
  color: var(--ds-text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

#page-learning .practice-command-primary > button {
  min-height: 40px;
  margin-top: 15px;
}

#page-learning .practice-command-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 13px;
}

#page-learning .practice-command-meta span {
  border: 1px solid var(--ds-border);
  border-radius: 999px;
  background: var(--ds-surface-subtle);
  padding: 4px 8px;
  color: var(--ds-text-muted);
  font-size: 11px;
}

#page-learning .practice-command-meta .status-doing,
#page-learning .practice-command-meta .status-ready {
  border-color: var(--ds-brand-border);
  background: var(--ds-brand-soft);
  color: var(--ds-brand-strong);
}

#page-learning .practice-recommendation {
  background: var(--ds-surface-subtle);
}

#page-learning .practice-recommendation h3 {
  margin-top: 5px;
  color: var(--ds-text);
  font-size: 16px;
  line-height: 1.35;
}

#page-learning .practice-recommendation p {
  margin-top: 8px;
  color: var(--ds-text-secondary);
  font-size: 12px;
  line-height: 1.6;
}

#page-learning .practice-recommendation p strong {
  color: var(--ds-text);
}

#page-learning .practice-recommendation button {
  width: fit-content;
  min-height: auto;
  margin-top: 12px;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--ds-brand-strong);
  font-size: 12px;
  font-weight: 760;
}

#page-learning .practice-recommendation button:hover {
  background: transparent;
  color: var(--ds-brand-pressed);
  text-decoration: underline;
}

#page-learning .practice-command-facts {
  display: grid;
  align-content: center;
  gap: 12px;
}

#page-learning .practice-command-facts span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--ds-border);
  padding-bottom: 10px;
}

#page-learning .practice-command-facts span:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

#page-learning .practice-command-facts strong {
  color: var(--ds-text);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

#page-learning .practice-command-facts small {
  color: var(--ds-text-muted);
  font-size: 11px;
}

#page-learning .practice-pending-queue {
  min-width: 0;
  border-top: 1px solid var(--ds-border);
  border-bottom: 1px solid var(--ds-border);
  background: var(--ds-surface);
  padding: 17px 18px;
}

#page-learning .practice-pending-queue > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

#page-learning .practice-pending-queue header h3 {
  margin: 3px 0 0;
  color: var(--ds-text);
  font-size: 15px;
}

#page-learning .practice-pending-queue header > span {
  color: var(--ds-text-muted);
  font-size: 11px;
}

#page-learning .practice-pending-queue > div {
  display: grid;
}

#page-learning .practice-pending-queue button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 2px 9px;
  min-width: 0;
  border: 0;
  border-top: 1px solid var(--ds-border);
  border-radius: 0;
  background: transparent;
  padding: 11px 0;
  text-align: left;
}

#page-learning .practice-pending-queue button > span {
  grid-row: 1 / 3;
  align-self: center;
  color: var(--ds-text-faint);
  font-size: 10px;
}

#page-learning .practice-pending-queue button strong,
#page-learning .practice-pending-queue button small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-learning .practice-pending-queue button strong {
  color: var(--ds-text-secondary);
  font-size: 12px;
}

#page-learning .practice-pending-queue button small {
  color: var(--ds-text-muted);
  font-size: 10px;
}

#page-learning .practice-pending-queue button b {
  grid-column: 3;
  grid-row: 1 / 3;
  align-self: center;
  border-radius: 999px;
  background: var(--ds-brand-soft);
  padding: 4px 7px;
  color: var(--ds-brand-strong);
  font-size: 9px;
  white-space: nowrap;
}

#page-learning .practice-pending-empty {
  gap: 4px;
  border-top: 1px solid var(--ds-border);
  padding-top: 14px;
}

#page-learning .practice-pending-empty strong {
  color: var(--ds-text-secondary);
  font-size: 12px;
}

#page-learning .practice-pending-empty span {
  color: var(--ds-text-muted);
  font-size: 11px;
}

#page-learning .control-grid {
  grid-template-columns: minmax(0, 1.12fr) minmax(390px, .88fr);
  align-items: start;
  gap: 16px;
}

#page-learning .practice-create-panel,
#page-learning .practice-library-panel {
  padding: 20px;
}

#page-learning .practice-builder-intro {
  margin: -2px 0 15px;
  border-left: 2px solid var(--ds-brand);
  padding-left: 10px;
  color: var(--ds-text-secondary);
  font-size: 12px;
  line-height: 1.6;
}

#page-learning .practice-library-toolbar {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(105px, .55fr) minmax(120px, .65fr);
  gap: 8px;
  margin-bottom: 10px;
}

#page-learning .practice-library-toolbar label {
  display: grid;
  gap: 4px;
  color: var(--ds-text-muted);
  font-size: 10px;
  font-weight: 760;
}

#page-learning .practice-library-toolbar input,
#page-learning .practice-library-toolbar select {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  border-color: var(--ds-border);
  background: var(--ds-surface-subtle);
  font-size: 12px;
}

#page-learning .practice-library-toolbar input:focus,
#page-learning .practice-library-toolbar select:focus {
  border-color: var(--ds-brand);
  box-shadow: 0 0 0 3px var(--ds-brand-soft);
}

#page-learning .practice-library-panel .summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 12px;
  border-top: 1px solid var(--ds-border);
  border-bottom: 1px solid var(--ds-border);
}

#page-learning .practice-library-panel .summary-item {
  border: 0;
  border-right: 1px solid var(--ds-border);
  border-radius: 0;
  background: transparent;
  padding: 11px 12px;
}

#page-learning .practice-library-panel .summary-item:last-child {
  border-right: 0;
}

#page-learning .practice-recent-head {
  margin: 17px 0 6px;
}

#page-learning .practice-recent-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--ds-border);
}

#page-learning .practice-recent-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 68px;
  border: 0;
  border-bottom: 1px solid var(--ds-border);
  border-radius: 0;
  background: transparent;
  padding: 10px 2px;
  text-align: left;
}

#page-learning .practice-recent-item:hover,
#page-learning .practice-recent-item.active {
  border-color: var(--ds-border);
  background: var(--ds-brand-soft);
}

#page-learning .practice-recent-date {
  display: grid;
  min-height: 42px;
  place-items: center;
  border: 1px solid var(--ds-border);
  border-radius: 8px;
  background: var(--ds-surface);
  color: var(--ds-text-muted);
  font-size: 10px;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
}

#page-learning .practice-recent-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

#page-learning .practice-recent-copy strong,
#page-learning .practice-recent-copy small,
#page-learning .practice-recent-copy em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-learning .practice-recent-copy strong {
  color: var(--ds-text-secondary);
  font-size: 12px;
}

#page-learning .practice-recent-copy small,
#page-learning .practice-recent-copy em {
  color: var(--ds-text-muted);
  font-size: 10px;
  font-style: normal;
}

#page-learning .practice-recent-copy em {
  color: var(--ds-text-faint);
}

#page-learning .practice-recent-result {
  display: grid;
  justify-items: end;
  gap: 4px;
}

#page-learning .practice-recent-result b {
  font-size: 10px;
}

#page-learning .practice-recent-result small {
  color: var(--ds-text-faint);
  font-size: 9px;
  white-space: nowrap;
}

#page-learning .practice-history-empty,
#page-learning .practice-paper-empty,
#page-learning .practice-result-empty {
  display: grid;
  justify-items: start;
  gap: 6px;
  background: var(--ds-surface-subtle);
  padding: 22px 18px;
}

#page-learning .practice-history-empty strong,
#page-learning .practice-paper-empty strong,
#page-learning .practice-result-empty strong {
  color: var(--ds-text);
  font-size: 14px;
}

#page-learning .practice-history-empty span,
#page-learning .practice-paper-empty p,
#page-learning .practice-result-empty span {
  margin: 0;
  color: var(--ds-text-secondary);
  font-size: 12px;
  line-height: 1.6;
}

#page-learning .practice-history-empty button,
#page-learning .practice-paper-empty button {
  margin-top: 4px;
}

#page-learning .exam-layout {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
  align-items: start;
  gap: 16px;
}

#page-learning .exam-paper,
#page-learning .exam-side {
  padding: 20px;
}

#page-learning .exam-side {
  position: sticky;
  top: 88px;
}

#page-learning .question-card {
  border: 0;
  border-top: 1px solid var(--ds-border);
  border-radius: 0;
  background: transparent;
  padding: 22px 0;
  box-shadow: none;
}

#page-learning .paper-header {
  border-bottom: 0;
  padding-bottom: 16px;
}

#page-learning .paper-header h1 {
  font-size: clamp(20px, 2.4vw, 26px);
}

#page-learning .exam-submit {
  position: sticky;
  bottom: 10px;
  z-index: 3;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-nested);
  background: rgb(255 255 255 / 96%);
  padding: 10px 12px;
  box-shadow: var(--ds-shadow-float);
  backdrop-filter: blur(8px);
}

#page-learning .practice-result-overview {
  display: grid;
  justify-items: start;
  gap: 6px;
  border-bottom: 1px solid var(--ds-border);
  background: var(--ds-brand-soft);
  margin: -4px -4px 14px;
  padding: 16px;
}

#page-learning .practice-result-overview > strong {
  color: var(--ds-brand-strong);
  font-size: 30px;
  line-height: 1;
}

#page-learning .practice-result-overview p {
  margin: 0;
  color: var(--ds-text-secondary);
  font-size: 12px;
  line-height: 1.6;
}

#page-learning .practice-result-overview > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 4px;
}

#page-learning .practice-result-overview button {
  min-height: 32px;
  padding: 5px 9px;
  font-size: 11px;
}

#page-learning .practice-result-report {
  color: var(--ds-text-secondary);
  font-size: 12px;
  line-height: 1.65;
}

#page-learning .learning-mistakes {
  margin-top: 16px;
  padding: 20px;
}

#page-learning .learning-mistakes .panel-head {
  align-items: flex-start;
}

#page-learning .learning-mistakes .table-toolbar {
  justify-content: flex-end;
}

#page-learning .practice-status.loading {
  border-left: 2px solid var(--ds-brand);
  background: var(--ds-brand-soft);
  padding: 9px 10px;
}

#page-learning .practice-status.error {
  border-left: 2px solid var(--ds-danger);
  background: var(--ds-danger-soft);
  padding: 9px 10px;
}

@media (max-width: 1180px) {
  #page-learning .practice-dashboard,
  #page-learning .control-grid,
  #page-learning .exam-layout {
    grid-template-columns: 1fr;
  }

  #page-learning .exam-side {
    position: static;
  }
}

@media (max-width: 860px) {
  #page-learning .practice-command-board {
    grid-template-columns: minmax(0, 1fr) minmax(240px, .75fr);
  }

  #page-learning .practice-command-facts {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--ds-border);
  }

  #page-learning .practice-command-facts span {
    display: grid;
    justify-items: start;
    gap: 2px;
    border-right: 1px solid var(--ds-border);
    border-bottom: 0;
    padding-right: 12px;
    padding-bottom: 0;
  }

  #page-learning .practice-command-facts span:last-child {
    border-right: 0;
    padding-right: 0;
  }
}

@media (max-width: 680px) {
  #page-learning .practice-command-board {
    display: block;
  }

  #page-learning .practice-command-board > * {
    border-left: 0;
    border-bottom: 1px solid var(--ds-border);
    padding: 18px 16px;
  }

  #page-learning .practice-command-board > *:last-child {
    border-bottom: 0;
  }

  #page-learning .practice-command-primary > button,
  #page-learning .practice-library-toolbar,
  #page-learning .practice-library-toolbar label,
  #page-learning .practice-library-toolbar input,
  #page-learning .practice-library-toolbar select {
    width: 100%;
  }

  #page-learning .practice-library-toolbar {
    grid-template-columns: 1fr;
  }

  #page-learning .practice-recent-item {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  #page-learning .practice-recent-result {
    grid-column: 2;
    justify-items: start;
    grid-template-columns: auto 1fr;
    align-items: center;
  }

  #page-learning .practice-pending-queue button {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  #page-learning .practice-pending-queue button > span {
    grid-row: auto;
  }

  #page-learning .practice-pending-queue button strong,
  #page-learning .practice-pending-queue button small {
    grid-column: 1;
  }

  #page-learning .practice-pending-queue button b {
    grid-column: 2;
    grid-row: 1 / 4;
  }

  #page-learning .exam-submit {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  #page-learning .exam-submit #answerProgress {
    grid-column: 1 / -1;
  }

  #page-learning .exam-submit button {
    width: 100%;
  }

  #page-learning .learning-mistakes .panel-head,
  #page-learning .learning-mistakes .table-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  #page-learning .learning-mistakes .table-toolbar > * {
    width: 100%;
  }
}

#page-training .training-stats {
  display: block;
  margin-bottom: 18px;
}

#page-training .training-command-strip {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, .7fr);
  overflow: hidden;
  border-top: 1px solid var(--ds-border);
  border-bottom: 1px solid var(--ds-border);
  border-left: 4px solid var(--ds-brand);
  background: var(--ds-surface);
}

#page-training .training-command-strip > * {
  min-width: 0;
  padding: 20px 22px;
}

#page-training .training-command-strip > * + * {
  border-left: 1px solid var(--ds-border);
}

#page-training .training-command-copy {
  display: grid;
  align-content: center;
  justify-items: start;
}

#page-training .training-command-copy h3,
#page-training .training-command-copy p,
#page-training .training-command-result strong,
#page-training .training-command-result small {
  margin: 0;
}

#page-training .training-command-copy h3 {
  margin-top: 5px;
  color: var(--ds-text);
  font-size: clamp(20px, 2.5vw, 28px);
  letter-spacing: -0.025em;
  line-height: 1.25;
}

#page-training .training-command-copy p {
  max-width: 670px;
  margin-top: 7px;
  color: var(--ds-text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

#page-training .training-command-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

#page-training .training-command-meta span {
  border: 1px solid var(--ds-border);
  border-radius: 999px;
  background: var(--ds-surface-subtle);
  padding: 4px 8px;
  color: var(--ds-text-muted);
  font-size: 11px;
}

#page-training .training-command-copy > button {
  min-height: 40px;
  margin-top: 15px;
}

#page-training .training-command-result {
  display: grid;
  align-content: center;
  gap: 6px;
  background: var(--ds-surface-subtle);
}

#page-training .training-command-result strong {
  color: var(--ds-text);
  font-size: 16px;
  line-height: 1.45;
}

#page-training .training-command-result small {
  color: var(--ds-text-secondary);
  font-size: 12px;
  line-height: 1.55;
}

#page-training .training-summary-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-bottom: 1px solid var(--ds-border);
  background: var(--ds-surface);
}

#page-training .training-summary-metrics > div {
  display: grid;
  min-width: 0;
  gap: 4px;
  border: 0;
  border-right: 1px solid var(--ds-border);
  border-radius: 0;
  background: transparent;
  padding: 14px 16px;
}

#page-training .training-summary-metrics > div:last-child {
  border-right: 0;
}

#page-training .training-summary-metrics span {
  color: var(--ds-text-muted);
  font-size: 11px;
}

#page-training .training-summary-metrics strong {
  color: var(--ds-text);
  font-size: 21px;
  font-variant-numeric: tabular-nums;
}

#page-training .training-summary-metrics small {
  color: var(--ds-text-faint);
  font-size: 10px;
}

#page-training .training-layout {
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
  align-items: start;
  gap: 16px;
}

#page-training .training-form,
#page-training .training-library {
  min-width: 0;
  padding: 20px;
}

#page-training .training-form > .panel-head {
  align-items: flex-start;
}

#page-training .training-template-status {
  margin: 12px 0 17px;
  border-left: 2px solid var(--ds-border-strong);
  background: var(--ds-surface-subtle);
  padding: 9px 11px;
  color: var(--ds-text-secondary);
  font-size: 12px;
  line-height: 1.6;
}

#page-training .training-meta-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
}

#page-training .training-meta-grid label {
  min-width: 0;
  color: var(--ds-text-secondary);
  font-size: 12px;
  font-weight: 700;
}

#page-training .training-meta-grid input,
#page-training .training-meta-grid select {
  width: 100%;
  min-width: 0;
  margin-top: 5px;
}

#page-training .training-record-sections {
  margin-top: 16px;
  border-top: 1px solid var(--ds-border);
  padding-top: 4px;
}

#page-training .training-dynamic-fields {
  display: grid;
  gap: 0;
  margin-top: 0;
}

#page-training .training-sheet-caption {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  column-gap: 10px;
  row-gap: 2px;
  border-bottom: 1px solid var(--ds-border);
  padding: 15px 0 13px;
}

#page-training .training-sheet-caption span {
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--ds-brand);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}

#page-training .training-sheet-caption strong {
  min-width: 0;
  color: var(--ds-text);
  font-size: 14px;
  line-height: 1.35;
}

#page-training .training-sheet-caption small {
  min-width: 0;
  color: var(--ds-text-muted);
  font-size: 11px;
  line-height: 1.45;
}

#page-training .training-dynamic-section {
  margin-top: 0;
  border-top: 0;
  border-bottom: 1px solid var(--ds-border);
  padding: 16px 0 18px;
}

#page-training .training-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

#page-training .training-section-heading h3 {
  margin: 0;
  color: var(--ds-text);
  font-size: 14px;
  line-height: 1.4;
}

#page-training .training-section-heading span {
  flex: 0 0 auto;
  color: var(--ds-text-faint);
  font-size: 11px;
}

#page-training .training-dynamic-section .training-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

#page-training .training-dynamic-section .training-field {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: var(--ds-text-secondary);
  font-size: 12px;
  font-weight: 700;
}

#page-training .training-dynamic-section .training-field.is-wide {
  grid-column: 1 / -1;
}

#page-training .training-dynamic-section .training-field.is-compact {
  max-width: 240px;
}

#page-training .training-dynamic-section textarea {
  min-height: 96px;
  resize: vertical;
}

#page-training .training-dynamic-section .training-field.is-half textarea {
  min-height: 116px;
}

#page-training .training-form .button-row {
  align-items: center;
  margin-top: 17px;
}

#page-training .training-history-tools {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) repeat(3, minmax(105px, .55fr));
  gap: 7px;
  margin: 14px 0 13px;
}

#page-training .training-history-tools input,
#page-training .training-history-tools select {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  border-color: var(--ds-border);
  background: var(--ds-surface-subtle);
  font-size: 12px;
}

#page-training .training-history-tools input:focus,
#page-training .training-history-tools select:focus {
  border-color: var(--ds-brand);
  box-shadow: 0 0 0 3px var(--ds-brand-soft);
}

#page-training .training-library .log-list {
  position: relative;
  display: grid;
  gap: 0;
  max-height: 620px;
  overflow: auto;
  border-top: 1px solid var(--ds-border);
  padding: 0;
}

#page-training .training-library .log-list::before {
  display: none;
}

#page-training .training-log-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) minmax(135px, .55fr);
  align-items: start;
  gap: 12px;
  min-width: 0;
  border: 0;
  border-bottom: 1px solid var(--ds-border);
  border-radius: 0;
  background: transparent;
  padding: 13px 2px;
  text-align: left;
}

#page-training .training-log-row:hover,
#page-training .training-log-row.active {
  background: var(--ds-brand-soft);
}

#page-training .training-log-row time {
  display: grid;
  gap: 3px;
  color: var(--ds-text-muted);
  font-variant-numeric: tabular-nums;
}

#page-training .training-log-row time strong {
  color: var(--ds-text-secondary);
  font-size: 12px;
}

#page-training .training-log-row time span {
  font-size: 10px;
}

#page-training .training-log-row-main,
#page-training .training-log-row-next {
  display: grid;
  min-width: 0;
  gap: 3px;
}

#page-training .training-log-row-main > strong {
  color: var(--ds-text-secondary);
  font-size: 13px;
}

#page-training .training-log-row-main small,
#page-training .training-log-row-main p,
#page-training .training-log-row-next small {
  margin: 0;
  overflow: hidden;
  color: var(--ds-text-muted);
  font-size: 10px;
  line-height: 1.55;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-training .training-log-row-main p {
  color: var(--ds-text-secondary);
}

#page-training .training-log-row-next {
  border-left: 1px solid var(--ds-border);
  padding-left: 12px;
}

#page-training .training-log-row-next span {
  color: var(--ds-text-faint);
  font-size: 10px;
  font-weight: 760;
}

#page-training .training-log-row-next small {
  white-space: normal;
}

#page-training .training-history-empty {
  display: grid;
  justify-items: start;
  gap: 6px;
  border-top: 1px solid var(--ds-border);
  background: var(--ds-surface-subtle);
  padding: 24px 16px;
}

#page-training .training-history-empty strong {
  color: var(--ds-text);
  font-size: 14px;
}

#page-training .training-history-empty span {
  color: var(--ds-text-secondary);
  font-size: 12px;
  line-height: 1.6;
}

#page-training .training-history-empty button {
  margin-top: 4px;
}

#page-training .training-trend-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--ds-border);
  border-bottom: 1px solid var(--ds-border);
  padding: 12px 2px;
}

#page-training .training-trend-summary strong {
  color: var(--ds-text);
  font-size: 20px;
}

#page-training .training-trend-summary span {
  color: var(--ds-text-muted);
  font-size: 11px;
}

#page-training .training-trend-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(52px, 1fr));
  gap: 8px;
  align-items: end;
  min-height: 230px;
  overflow-x: auto;
  padding: 18px 4px 8px;
}

#page-training .training-trend-chart article {
  display: grid;
  min-width: 52px;
  gap: 5px;
  align-items: end;
  text-align: center;
}

#page-training .training-trend-chart article > div {
  display: flex;
  height: 150px;
  align-items: end;
  justify-content: center;
  border-bottom: 1px solid var(--ds-border);
}

#page-training .training-trend-chart i {
  display: block;
  width: 24px;
  min-height: 4px;
  border-radius: 5px 5px 0 0;
  background: var(--ds-brand);
}

#page-training .training-trend-chart strong {
  color: var(--ds-text-secondary);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

#page-training .training-trend-chart span {
  overflow: hidden;
  color: var(--ds-text-muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1020px) {
  #page-training .training-layout {
    grid-template-columns: 1fr;
  }

  #page-training .training-library {
    position: static;
  }
}

@media (max-width: 760px) {
  #page-training .training-command-strip {
    display: block;
  }

  #page-training .training-command-strip > * {
    border-left: 0;
    border-bottom: 1px solid var(--ds-border);
    padding: 18px 16px;
  }

  #page-training .training-command-strip > *:last-child {
    border-bottom: 0;
  }

  #page-training .training-summary-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #page-training .training-summary-metrics > div:nth-child(2n) {
    border-right: 0;
  }

  #page-training .training-summary-metrics > div:nth-child(n + 3) {
    border-top: 1px solid var(--ds-border);
  }

  #page-training .training-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #page-training .training-dynamic-section .training-grid {
    grid-template-columns: 1fr;
  }

  #page-training .training-dynamic-section .training-field.is-wide {
    grid-column: auto;
  }

  #page-training .training-history-tools {
    grid-template-columns: 1fr 1fr;
  }

  #page-training .training-history-tools input {
    grid-column: 1 / -1;
  }

  #page-training .training-log-row {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 10px;
  }

  #page-training .training-log-row-next {
    grid-column: 2;
    border-top: 1px solid var(--ds-border);
    border-left: 0;
    padding-top: 8px;
    padding-left: 0;
  }

  #page-training .training-form .button-row,
  #page-training .training-template-action-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  #page-training .training-form .button-row > *,
  #page-training .training-template-action-row > * {
    width: 100%;
  }
}

@media (max-width: 480px) {
  #page-training .training-meta-grid,
  #page-training .training-history-tools {
    grid-template-columns: 1fr;
  }

  #page-training .training-sheet-caption {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  #page-training .training-sheet-caption span {
    grid-row: auto;
    align-self: auto;
  }

  #page-training .training-dynamic-section .training-field.is-compact {
    max-width: none;
  }

  #page-training .training-history-tools input {
    grid-column: auto;
  }

  #page-training .training-form .button-row,
  #page-training .training-template-action-row {
    grid-template-columns: 1fr;
  }
}

#page-review .review-dashboard {
  display: grid;
  gap: 14px;
  margin-bottom: 10px;
}

#page-review .review-command-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  border-top: 1px solid var(--ds-border);
  border-right: 1px solid var(--ds-border);
  border-bottom: 1px solid var(--ds-border);
  border-left: 4px solid var(--ds-brand);
  background: var(--ds-surface);
  padding: 20px 22px;
}

#page-review .review-command-copy h3,
#page-review .review-command-copy p {
  margin: 0;
}

#page-review .review-command-copy h3 {
  margin-top: 5px;
  color: var(--ds-text);
  font-size: clamp(20px, 2.4vw, 28px);
  letter-spacing: -.025em;
  line-height: 1.25;
}

#page-review .review-command-copy p {
  max-width: 680px;
  margin-top: 7px;
  color: var(--ds-text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

#page-review .review-command-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}

#page-review .review-command-meta span,
#page-review .review-dashboard-toolbar > span {
  color: var(--ds-text-muted);
  font-size: 11px;
}

#page-review .review-command-meta span {
  border-left: 2px solid var(--ds-border-strong);
  padding-left: 8px;
}

#page-review .review-command-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

#page-review .review-dashboard-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--ds-border);
  padding: 0 2px 10px;
}

#page-review .review-dashboard-toolbar label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ds-text-secondary);
  font-size: 12px;
  font-weight: 700;
}

#page-review .review-dashboard-toolbar select {
  min-width: 150px;
  min-height: 34px;
  border-color: var(--ds-border);
  background: var(--ds-surface-subtle);
}

#page-review .review-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  gap: 14px;
}

#page-review .review-section {
  min-width: 0;
  border-top: 2px solid var(--ds-border-strong);
  background: var(--ds-surface);
  padding: 16px 18px;
}

#page-review .review-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

#page-review .review-section-heading h3,
#page-review .review-section-heading p {
  margin: 0;
}

#page-review .review-section-heading h3 {
  margin-top: 3px;
  color: var(--ds-text);
  font-size: 16px;
}

#page-review .review-section-heading p {
  margin-top: 4px;
  color: var(--ds-text-muted);
  font-size: 11px;
  line-height: 1.5;
}

#page-review .review-section-heading > strong {
  color: var(--ds-text-secondary);
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

#page-review .review-task-list,
#page-review .review-paper-list,
#page-review .review-weak-list {
  display: grid;
}

#page-review .review-task-row,
#page-review .review-paper-row,
#page-review .review-weak-row {
  display: grid;
  min-width: 0;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--ds-border);
  padding: 10px 0;
}

#page-review .review-task-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

#page-review .review-paper-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

#page-review .review-weak-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

#page-review .review-task-open,
#page-review .review-weak-row > button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  gap: 9px;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
}

#page-review .review-task-open:hover,
#page-review .review-weak-row > button:hover {
  color: var(--ds-brand-strong);
}

#page-review .review-task-open > span:last-child,
#page-review .review-weak-row > button {
  min-width: 0;
}

#page-review .review-task-open strong,
#page-review .review-task-open small,
#page-review .review-weak-row strong,
#page-review .review-weak-row small,
#page-review .review-paper-row strong,
#page-review .review-paper-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-review .review-task-open strong,
#page-review .review-weak-row strong,
#page-review .review-paper-row strong {
  color: var(--ds-text-secondary);
  font-size: 12px;
}

#page-review .review-task-open small,
#page-review .review-weak-row small,
#page-review .review-paper-row small,
#page-review .review-paper-row > div > span {
  margin-top: 3px;
  color: var(--ds-text-muted);
  font-size: 10px;
  line-height: 1.5;
}

#page-review .review-paper-row > div > span {
  display: block;
  margin-top: 0;
  color: var(--ds-text-faint);
}

#page-review .review-date-mark {
  display: grid;
  min-width: 58px;
  min-height: 38px;
  place-items: center;
  border-radius: 7px;
  background: var(--ds-surface-muted);
  color: var(--ds-text-muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

#page-review .review-date-mark.due {
  background: var(--ds-danger-soft);
  color: var(--ds-danger);
}

#page-review .review-date-mark.upcoming {
  background: var(--ds-brand-soft);
  color: var(--ds-brand-strong);
}

#page-review .review-task-actions,
#page-review .review-weak-row > div {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

#page-review .review-task-actions select,
#page-review .review-weak-row select {
  min-height: 30px;
  max-width: 110px;
  border-color: var(--ds-border);
  background: var(--ds-surface-subtle);
  color: var(--ds-text-secondary);
  font-size: 10px;
}

#page-review .review-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

#page-review .review-status-pill.muted {
  background: var(--ds-surface-muted);
  color: var(--ds-text-muted);
}

#page-review .review-status-pill.brand {
  background: var(--ds-brand-soft);
  color: var(--ds-brand-strong);
}

#page-review .review-status-pill.success {
  background: var(--ds-success-soft);
  color: var(--ds-success);
}

#page-review .review-paper-row > div {
  min-width: 0;
}

#page-review .review-paper-row button,
#page-review .review-empty-state button {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 10px;
}

#page-review .review-empty-state {
  display: grid;
  justify-items: start;
  gap: 6px;
  border-top: 1px solid var(--ds-border);
  background: var(--ds-surface-subtle);
  padding: 16px 12px;
}

#page-review .review-empty-state strong {
  color: var(--ds-text);
  font-size: 13px;
}

#page-review .review-empty-state span {
  color: var(--ds-text-secondary);
  font-size: 11px;
  line-height: 1.6;
}

#page-review .review-trend-chart {
  display: grid;
  grid-template-columns: repeat(6, minmax(32px, 1fr));
  align-items: end;
  gap: 8px;
  min-height: 150px;
  border-bottom: 1px solid var(--ds-border);
  padding: 12px 2px 0;
}

#page-review .review-trend-chart > div {
  display: grid;
  min-width: 0;
  align-items: end;
  justify-items: center;
  gap: 5px;
}

#page-review .review-trend-chart i {
  display: block;
  width: min(26px, 70%);
  min-height: 10px;
  border-radius: 5px 5px 0 0;
  background: var(--ds-brand);
}

#page-review .review-trend-chart span,
#page-review .review-trend-chart strong {
  color: var(--ds-text-muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

#page-review .review-trend-chart strong {
  color: var(--ds-text-secondary);
}

#page-review .review-generation-status {
  min-height: 18px;
  margin: 0 0 4px;
  color: var(--ds-success);
  font-size: 11px;
}

@media (max-width: 980px) {
  #page-review .review-command-bar,
  #page-review .review-dashboard-grid {
    grid-template-columns: 1fr;
  }

  #page-review .review-command-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  #page-review .review-command-bar {
    padding: 17px 15px;
  }

  #page-review .review-command-actions,
  #page-review .review-command-actions button {
    width: 100%;
  }

  #page-review .review-dashboard-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  #page-review .review-dashboard-toolbar label,
  #page-review .review-dashboard-toolbar select {
    width: 100%;
  }

  #page-review .review-task-row,
  #page-review .review-paper-row,
  #page-review .review-weak-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  #page-review .review-task-actions,
  #page-review .review-weak-row > div {
    justify-content: flex-start;
  }

  #page-review .review-task-actions select,
  #page-review .review-weak-row select {
    max-width: none;
    flex: 1;
  }

  #page-review .review-trend-chart {
    grid-template-columns: repeat(6, minmax(28px, 1fr));
    gap: 4px;
  }
}

/* Data and backup: a restrained operation ledger with explicit scope and risk. */
#page-export .settings-layout {
  grid-template-columns: 218px minmax(0, 1fr);
  gap: 20px;
}

#page-export .settings-navigation {
  top: calc(var(--ds-topbar-height, 68px) + 20px);
  overflow: hidden;
  gap: 2px;
  border-color: var(--ds-border);
  padding: 10px;
  box-shadow: none;
}

#page-export .settings-nav-head {
  margin: 0 0 6px;
  padding: 7px 8px 14px;
}

#page-export .settings-nav-head span {
  font-size: 10px;
}

#page-export .settings-nav-head strong {
  font-size: 15px;
}

#page-export .settings-navigation button {
  grid-template-columns: 26px minmax(0, 1fr);
  min-height: 42px;
  border: 0;
  border-radius: 9px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 650;
  box-shadow: none;
}

#page-export .settings-navigation button span {
  font-variant-numeric: tabular-nums;
  font-size: 10px;
}

#page-export .settings-navigation button:hover {
  background: var(--ds-surface-muted);
  color: var(--ds-text);
}

#page-export .settings-navigation button.active {
  border-color: transparent;
  background: var(--ds-brand-soft);
  color: var(--ds-brand-strong);
  box-shadow: inset 3px 0 0 var(--ds-brand);
}

#page-export .settings-navigation button.danger:not(.active) {
  color: var(--ds-text-muted);
}

#page-export .settings-navigation button.danger:hover {
  background: var(--ds-danger-soft);
  color: var(--ds-danger);
}

#page-export .settings-content {
  gap: 18px;
}

#page-export .settings-content > .panel {
  overflow: hidden;
  border-color: var(--ds-border);
  box-shadow: none;
}

#page-export .settings-runtime,
#page-export .settings-section {
  min-height: 0;
  padding: 0;
  scroll-margin-top: 96px;
}

#page-export .settings-status-header {
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 14px;
  padding: 24px;
}

#page-export .settings-status-icon {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ds-text-faint);
  box-shadow: 0 0 0 5px var(--ds-surface-muted);
}

#page-export .settings-status-icon.connected {
  background: var(--ds-success);
  box-shadow: 0 0 0 5px var(--ds-success-soft);
}

#page-export .settings-status-header h2 {
  margin: 4px 0 5px;
  font-size: 21px;
  letter-spacing: -0.02em;
}

#page-export .settings-status-header p {
  max-width: 680px;
  color: var(--ds-text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

#page-export .settings-status-meta {
  display: grid;
  justify-items: end;
  gap: 7px;
  align-self: start;
}

#page-export .settings-connection-state,
#page-export .settings-version {
  border-radius: var(--ds-radius-pill);
  padding: 5px 9px;
  font-size: 10px;
  font-weight: 750;
}

#page-export .settings-connection-state {
  background: var(--ds-surface-muted);
  color: var(--ds-text-muted);
}

#page-export .settings-connection-state.connected {
  background: var(--ds-success-soft);
  color: var(--ds-success);
}

#page-export .settings-version {
  position: static;
  background: transparent;
  color: var(--ds-text-faint);
  padding: 0;
}

#page-export .settings-runtime-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--ds-border);
  border-bottom: 1px solid var(--ds-border);
  background: var(--ds-surface-subtle);
}

#page-export .settings-runtime-grid > div {
  gap: 5px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 17px 18px;
}

#page-export .settings-runtime-grid > div + div {
  border-left: 1px solid var(--ds-border);
}

#page-export .settings-runtime-grid span,
#page-export .settings-runtime-grid small {
  font-size: 11px;
}

#page-export .settings-runtime-grid strong {
  overflow: visible;
  color: var(--ds-text);
  font-size: 13px;
  line-height: 1.45;
  text-overflow: clip;
  white-space: normal;
}

#page-export .settings-runtime-actions {
  margin: 0;
  padding: 18px 24px 0;
}

#page-export .settings-runtime > #settingsBox > .settings-help {
  margin: 0;
  padding: 13px 24px 21px;
}

#page-export .settings-section-heading {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 18px;
  border-bottom: 1px solid var(--ds-border);
  padding: 22px 24px 20px;
}

#page-export .settings-section-heading > span {
  color: var(--ds-text-faint);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.13em;
  line-height: 1.8;
}

#page-export .settings-section-heading h2,
#page-export .settings-section-heading p,
#page-export .settings-subsection h3,
#page-export .settings-subsection p,
#page-export .settings-export-option h3,
#page-export .settings-export-option p,
#page-export .restore-impact p {
  margin: 0;
}

#page-export .settings-section-heading h2 {
  color: var(--ds-text);
  font-size: 18px;
  letter-spacing: -0.015em;
}

#page-export .settings-section-heading p {
  margin-top: 5px;
  color: var(--ds-text-secondary);
  font-size: 13px;
  line-height: 1.55;
}

#page-export .data-scope-ledger {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid var(--ds-border);
  background: var(--ds-surface-subtle);
}

#page-export .data-scope-ledger > div {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 3px 14px;
  padding: 18px 24px;
}

#page-export .data-scope-ledger > div + div {
  border-left: 1px solid var(--ds-border);
}

#page-export .data-scope-ledger span {
  grid-row: 1 / span 2;
  color: var(--ds-text-faint);
  font-size: 11px;
  font-weight: 750;
}

#page-export .data-scope-ledger strong {
  color: var(--ds-text);
  font-size: 13px;
}

#page-export .data-scope-ledger p {
  margin: 0;
  color: var(--ds-text-muted);
  font-size: 12px;
  line-height: 1.55;
}

#page-export .settings-subsection {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 24px;
}

#page-export .settings-subsection + .settings-subsection,
#page-export .data-operation-slot:not(:empty) + .settings-subsection {
  border-top: 1px solid var(--ds-border);
}

#page-export .settings-subsection h3,
#page-export .settings-export-option h3 {
  margin-top: 4px;
  color: var(--ds-text);
  font-size: 15px;
}

#page-export .settings-subsection p,
#page-export .settings-export-option p {
  margin-top: 5px;
  max-width: 620px;
  color: var(--ds-text-muted);
  font-size: 12px;
  line-height: 1.55;
}

#page-export .settings-manual-backup button {
  flex: 0 0 auto;
}

#page-export .settings-auto-backup {
  align-items: flex-end;
  background: var(--ds-surface-subtle);
}

#page-export .auto-backup-settings {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 14px;
}

#page-export .auto-backup-settings label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ds-text-secondary);
  font-size: 12px;
}

#page-export .auto-backup-settings input[type="number"] {
  width: 86px;
}

#page-export .data-operation-slot:empty {
  display: none;
}

#page-export .data-operation-feedback {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  align-items: start;
  gap: 11px;
  border-top: 1px solid var(--ds-border);
  background: var(--ds-surface-subtle);
  padding: 13px 24px;
}

#page-export .data-operation-feedback > span {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--ds-text-faint);
}

#page-export .data-operation-feedback strong {
  display: block;
  color: var(--ds-text-secondary);
  font-size: 12px;
}

#page-export .data-operation-feedback p {
  margin: 2px 0 0;
  color: var(--ds-text-muted);
  font-size: 12px;
  line-height: 1.5;
}

#page-export .data-operation-feedback.progress > span {
  background: var(--ds-brand);
  animation: data-status-pulse 1.2s ease-in-out infinite;
}

#page-export .data-operation-feedback.success {
  background: var(--ds-success-soft);
}

#page-export .data-operation-feedback.success > span {
  background: var(--ds-success);
}

#page-export .data-operation-feedback.error {
  background: var(--ds-danger-soft);
}

#page-export .data-operation-feedback.error > span {
  background: var(--ds-danger);
}

#page-export .data-operation-feedback.error strong {
  color: var(--ds-danger);
}

@keyframes data-status-pulse {
  50% { opacity: 0.35; transform: scale(0.82); }
}

#page-export .settings-export-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
}

#page-export .settings-export-option {
  display: flex;
  min-width: 0;
  min-height: 235px;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 24px;
}

#page-export .settings-export-option + .settings-export-option {
  border-left: 1px solid var(--ds-border);
  background: var(--ds-surface-subtle);
}

#page-export .settings-export-option label {
  display: grid;
  width: min(520px, 100%);
  gap: 7px;
  color: var(--ds-text-secondary);
  font-size: 12px;
}

#page-export .settings-export-option select {
  width: 100%;
}

#page-export .settings-export-option button {
  margin-top: auto;
}

#page-export .restore-process {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border-bottom: 1px solid var(--ds-border);
  padding: 0;
  list-style: none;
}

#page-export .restore-process li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  padding: 18px;
}

#page-export .restore-process li + li {
  border-left: 1px solid var(--ds-border);
}

#page-export .restore-process li > span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid var(--ds-border-strong);
  border-radius: 50%;
  color: var(--ds-text-muted);
  font-size: 10px;
  font-weight: 800;
}

#page-export .restore-process strong,
#page-export .restore-process small {
  display: block;
}

#page-export .restore-process strong {
  color: var(--ds-text-secondary);
  font-size: 12px;
}

#page-export .restore-process small {
  margin-top: 4px;
  color: var(--ds-text-muted);
  font-size: 11px;
  line-height: 1.45;
}

#page-export #settingsImport > .upload-label {
  width: calc(100% - 48px);
  min-height: 48px;
  margin: 20px 24px;
  justify-content: center;
}

#page-export #settingsImport > .settings-help {
  margin: 0;
  border-top: 1px solid var(--ds-border);
  padding: 13px 24px 18px;
}

#page-export .restore-preview-box {
  margin: 0 24px 20px;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-nested);
  background: var(--ds-surface);
}

#page-export .restore-preview-box.empty-state,
#page-export .restore-preview-box.data-state-placeholder {
  min-height: 116px;
}

#page-export .restore-preview-box > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--ds-border);
  padding: 17px 18px;
}

#page-export .restore-preview-box > header h3 {
  overflow-wrap: anywhere;
  margin: 4px 0 0;
  color: var(--ds-text);
  font-size: 15px;
}

#page-export .restore-preview-box > header > span {
  color: var(--ds-text-faint);
  font-family: var(--ds-font-mono, ui-monospace, monospace);
  font-size: 10px;
}

#page-export .restore-summary-grid {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  border-bottom: 1px solid var(--ds-border);
  background: var(--ds-surface-subtle);
}

#page-export .restore-summary-grid > span {
  display: grid;
  gap: 4px;
  padding: 14px 18px;
  color: var(--ds-text-muted);
  font-size: 11px;
}

#page-export .restore-summary-grid > span + span {
  border-left: 1px solid var(--ds-border);
}

#page-export .restore-summary-grid strong {
  color: var(--ds-text-secondary);
  font-size: 12px;
}

#page-export .restore-impact {
  border-bottom: 1px solid var(--ds-warning-border);
  background: var(--ds-warning-soft);
  padding: 13px 18px;
}

#page-export .restore-impact strong {
  color: var(--ds-warning);
  font-size: 12px;
}

#page-export .restore-impact p {
  margin-top: 3px;
  color: var(--ds-text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

#page-export .restore-options {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding: 16px 18px;
}

#page-export .restore-options label {
  color: var(--ds-text-secondary);
  font-size: 12px;
}

#page-export .restore-options label:not(.inline-check) {
  display: flex;
  align-items: center;
  gap: 8px;
}

#page-export .restore-options select {
  width: auto;
  min-width: 180px;
}

#page-export .restore-preview-box > .button-row {
  justify-content: flex-end;
  margin: 0;
  border-top: 1px solid var(--ds-border);
  padding: 14px 18px;
}

#page-export .settings-record-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  gap: 14px;
  border-bottom: 1px solid var(--ds-border);
  background: var(--ds-surface-subtle);
  padding: 11px 24px;
  color: var(--ds-text-muted);
  font-size: 12px;
}

#page-export .settings-record-summary > strong {
  color: var(--ds-text-secondary);
  font-size: 12px;
}

#page-export .settings-record-summary .data-operation-feedback {
  width: calc(100% + 48px);
  margin: -11px -24px;
  border-top: 0;
}

#page-export .backup-history-list {
  display: grid;
}

#page-export .backup-history-item {
  display: grid;
  grid-template-columns: minmax(170px, 0.75fr) minmax(280px, 1.45fr) auto;
  align-items: center;
  gap: 18px;
  min-width: 0;
  padding: 16px 24px;
}

#page-export .backup-history-item + .backup-history-item {
  border-top: 1px solid var(--ds-border);
}

#page-export .backup-record-time,
#page-export .backup-record-detail {
  display: grid;
  min-width: 0;
  gap: 4px;
}

#page-export .backup-record-time strong {
  color: var(--ds-text);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

#page-export .backup-record-time span,
#page-export .backup-record-detail small {
  overflow: hidden;
  color: var(--ds-text-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#page-export .backup-record-detail > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--ds-text-muted);
  font-size: 11px;
}

#page-export .backup-record-status {
  border-radius: var(--ds-radius-pill);
  background: var(--ds-surface-muted);
  color: var(--ds-text-secondary);
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 750;
}

#page-export .backup-record-status.ready {
  background: var(--ds-success-soft);
  color: var(--ds-success);
}

#page-export .backup-record-status.failed {
  background: var(--ds-danger-soft);
  color: var(--ds-danger);
}

#page-export .backup-record-status.creating {
  background: var(--ds-brand-soft);
  color: var(--ds-brand-strong);
}

#page-export .backup-record-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

#page-export .backup-record-actions button {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 11px;
}

#page-export .data-state-placeholder {
  display: grid;
  justify-items: start;
  gap: 4px;
  min-height: 130px;
  align-content: center;
  background: var(--ds-surface-subtle);
  padding: 24px;
}

#page-export .data-state-placeholder strong {
  color: var(--ds-text-secondary);
  font-size: 13px;
}

#page-export .data-state-placeholder span {
  color: var(--ds-text-muted);
  font-size: 12px;
  line-height: 1.55;
}

#page-export .data-state-placeholder button {
  margin-top: 8px;
}

#page-export .data-state-placeholder.error {
  background: var(--ds-danger-soft);
}

#page-export .settings-danger-zone {
  align-items: center;
  border-color: var(--ds-danger-border);
  background: var(--ds-surface);
  padding: 20px 24px;
}

#page-export .settings-danger-zone::before {
  align-self: stretch;
  width: 3px;
  flex: 0 0 auto;
  border-radius: 3px;
  background: var(--ds-danger);
  content: "";
}

#page-export .settings-danger-copy {
  flex: 1 1 auto;
}

#page-export .settings-danger-zone h2 {
  color: var(--ds-text);
  font-size: 16px;
}

#page-export .settings-danger-zone p {
  max-width: 720px;
  color: var(--ds-text-secondary);
  font-size: 12px;
  line-height: 1.55;
}

#page-export .settings-danger-zone .data-operation-feedback {
  margin-top: 12px;
  border: 1px solid var(--ds-danger-border);
  border-radius: var(--ds-radius-control);
  padding: 10px 12px;
}

@media (prefers-reduced-motion: reduce) {
  #page-export .data-operation-feedback.progress > span {
    animation: none;
  }
}

@media (max-width: 1100px) {
  #page-export .settings-runtime-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #page-export .settings-runtime-grid > div:nth-child(3) {
    border-top: 1px solid var(--ds-border);
    border-left: 0;
  }

  #page-export .settings-runtime-grid > div:nth-child(4) {
    border-top: 1px solid var(--ds-border);
  }

  #page-export .restore-process {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #page-export .restore-process li:nth-child(3) {
    border-top: 1px solid var(--ds-border);
    border-left: 0;
  }

  #page-export .restore-process li:nth-child(4) {
    border-top: 1px solid var(--ds-border);
  }
}

@media (max-width: 980px) {
  #page-export .settings-layout {
    grid-template-columns: 1fr;
  }

  #page-export .settings-navigation {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #page-export .settings-nav-head {
    grid-column: 1 / -1;
  }

  #page-export .settings-navigation button {
    grid-template-columns: 24px minmax(0, 1fr);
    justify-items: start;
    text-align: left;
  }

  #page-export .settings-navigation button span {
    display: block;
  }

  #page-export .backup-history-item {
    grid-template-columns: minmax(150px, 0.7fr) minmax(240px, 1.3fr);
  }

  #page-export .backup-record-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  #page-export .settings-navigation {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #page-export .settings-status-header {
    grid-template-columns: 14px minmax(0, 1fr);
    padding: 20px;
  }

  #page-export .settings-status-meta {
    grid-column: 2;
    grid-auto-flow: column;
    justify-content: start;
    justify-items: start;
  }

  #page-export .settings-section-heading {
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 19px 20px;
  }

  #page-export .data-scope-ledger,
  #page-export .settings-export-grid {
    grid-template-columns: 1fr;
  }

  #page-export .data-scope-ledger > div + div,
  #page-export .settings-export-option + .settings-export-option {
    border-top: 1px solid var(--ds-border);
    border-left: 0;
  }

  #page-export .settings-subsection {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
    padding: 18px 20px;
  }

  #page-export .settings-manual-backup button,
  #page-export .settings-export-option button {
    width: 100%;
  }

  #page-export .auto-backup-settings {
    align-items: stretch;
    flex-direction: column;
  }

  #page-export .settings-export-option {
    min-height: 0;
    padding: 20px;
  }

  #page-export #settingsImport > .upload-label {
    width: calc(100% - 40px);
    margin: 18px 20px;
  }

  #page-export .restore-preview-box {
    margin: 0 20px 18px;
  }

  #page-export .restore-summary-grid {
    grid-template-columns: 1fr;
  }

  #page-export .restore-summary-grid > span + span {
    border-top: 1px solid var(--ds-border);
    border-left: 0;
  }

  #page-export .restore-options {
    align-items: stretch;
    flex-direction: column;
  }

  #page-export .restore-options label:not(.inline-check) {
    align-items: stretch;
    flex-direction: column;
  }

  #page-export .restore-options select {
    width: 100%;
    min-width: 0;
  }

  #page-export .backup-history-item {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 16px 20px;
  }

  #page-export .backup-record-actions {
    grid-column: auto;
  }

  #page-export .backup-record-detail small {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  #page-export .settings-danger-zone {
    display: grid;
    grid-template-columns: 3px minmax(0, 1fr);
    align-items: stretch;
    padding: 18px 20px;
  }

  #page-export .settings-danger-zone::before {
    grid-row: 1 / span 2;
    min-height: 100px;
  }

  #page-export .settings-danger-copy {
    grid-column: 2;
  }

  #page-export .settings-danger-zone button {
    grid-column: 2;
    width: 100%;
    margin: 0;
  }
}

@media (max-width: 520px) {
  #page-export .settings-navigation button {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 7px;
    text-align: center;
  }

  #page-export .settings-navigation button span {
    display: none;
  }

  #page-export .settings-runtime-grid,
  #page-export .restore-process {
    grid-template-columns: 1fr;
  }

  #page-export .settings-runtime-grid > div + div,
  #page-export .settings-runtime-grid > div:nth-child(3),
  #page-export .settings-runtime-grid > div:nth-child(4),
  #page-export .restore-process li + li,
  #page-export .restore-process li:nth-child(3),
  #page-export .restore-process li:nth-child(4) {
    border-top: 1px solid var(--ds-border);
    border-left: 0;
  }

  #page-export .data-scope-ledger > div {
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 17px 20px;
  }

  #page-export .data-scope-ledger span {
    grid-row: auto;
  }

  #page-export .restore-process li {
    padding: 15px 20px;
  }

  #page-export .restore-preview-box > header {
    align-items: stretch;
    flex-direction: column;
  }

  #page-export .restore-preview-box > .button-row,
  #page-export .backup-record-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  #page-export .restore-preview-box > .button-row button,
  #page-export .backup-record-actions button {
    width: 100%;
  }

  #page-export .settings-record-summary {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Public component baseline: shared controls, states, icons and action priority. */
.ui-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.ui-inline-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: -3px;
}

.ui-inline-icon .ui-icon {
  width: 1em;
  height: 1em;
}

button.ui-icon-button,
button.icon-btn,
button.ghost-btn.modal-close {
  display: inline-grid;
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  place-items: center;
  border-color: transparent;
  border-radius: var(--ds-control-radius);
  background: transparent;
  color: var(--ds-text-muted);
  padding: 0;
  box-shadow: none;
}

button.ui-icon-button:hover:not(:disabled),
button.icon-btn:hover:not(:disabled),
button.ghost-btn.modal-close:hover:not(:disabled) {
  border-color: var(--ds-border);
  background: var(--ds-surface-muted);
  color: var(--ds-text);
}

button.ui-icon-button.primary,
button.icon-btn.primary {
  border-color: var(--ds-brand);
  background: var(--ds-brand);
  color: var(--ds-on-brand);
}

.button-text,
.text-button,
[data-button-variant="text"] {
  min-height: 34px;
  border-color: transparent;
  background: transparent;
  color: var(--ds-brand-strong);
  padding-right: 8px;
  padding-left: 8px;
  box-shadow: none;
}

.button-text:hover:not(:disabled),
.text-button:hover:not(:disabled),
[data-button-variant="text"]:hover:not(:disabled) {
  border-color: transparent;
  background: var(--ds-brand-soft);
  color: var(--ds-brand-strong);
}

button.primary.ui-secondary-priority,
.button-link.primary.ui-secondary-priority {
  border-color: var(--ds-border-strong);
  background: var(--ds-surface);
  color: var(--ds-text-secondary);
  box-shadow: none;
}

button.primary.ui-secondary-priority:hover:not(:disabled),
.button-link.primary.ui-secondary-priority:hover {
  border-color: var(--ds-border-hover);
  background: var(--ds-surface-subtle);
  color: var(--ds-text);
}

:where(input, textarea, select)[aria-invalid="true"] {
  border-color: var(--ds-danger);
  background: var(--ds-danger-soft);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ds-danger) 13%, transparent);
}

:where(input, textarea, select)[aria-invalid="true"]:focus {
  border-color: var(--ds-danger);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--ds-danger) 16%, transparent);
}

.form-error:not(.hidden),
[role="alert"]:not(.hidden) {
  margin-top: 7px;
  color: var(--ds-danger);
  font-size: 13px;
  line-height: 1.5;
}

.ui-filter-bar {
  gap: 10px;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-nested);
  background: var(--ds-surface-subtle);
  padding: 10px;
  box-shadow: none;
}

.ui-filter-bar :where(input[type="search"], input:not([type]), select) {
  background: var(--ds-surface);
}

:where(.chip, .tag-row > span, .status-badge, .stock-status, .annual-status-badge, .risk-badge, [class*="status-pill"]) {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: var(--ds-radius-pill);
  padding: 3px 8px;
  font-size: var(--ds-font-size-meta);
  font-weight: 700;
  line-height: 1.25;
  box-shadow: none;
}

:where(.panel, .home-overview > .panel):not(:is(a, button, [role="button"])):hover {
  border-color: var(--ds-border);
}

table tbody tr:hover > :is(th, td) {
  background: var(--ds-surface-subtle);
}

table :is(th, td) :where(button, .button-link) {
  min-height: 32px;
  padding: 5px 9px;
  font-size: 12px;
}

.ui-state-view > .ui-state-icon {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--ds-text-faint);
}

.ui-state-view > .ui-state-icon .ui-icon {
  width: 22px;
  height: 22px;
}

.ui-state-view > strong {
  color: var(--ds-text);
  font-size: 15px;
  line-height: 1.4;
}

.ui-state-view > :is(p, span:not(.ui-state-icon)) {
  color: var(--ds-text-muted);
  font-size: 13px;
  line-height: 1.55;
}

.ui-state-view[data-empty-kind="error"] {
  border-color: var(--ds-danger-border);
  background: var(--ds-danger-soft);
}

.ui-status-message {
  position: relative;
  margin: 0;
  color: var(--ds-text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.ui-status-message:not(:empty) {
  border-left: 2px solid var(--ds-border-strong);
  background: var(--ds-surface-subtle);
  padding: 9px 11px;
}

.ui-status-message.success,
.ui-status-message[data-state="success"] {
  border-left-color: var(--ds-success);
  background: var(--ds-success-soft);
  color: var(--ds-success);
}

.ui-status-message.error,
.ui-status-message[data-state="error"] {
  border-left-color: var(--ds-danger);
  background: var(--ds-danger-soft);
  color: var(--ds-danger);
}

.ui-status-message.warning,
.ui-status-message[data-state="warning"] {
  border-left-color: var(--ds-warning);
  background: var(--ds-warning-soft);
  color: var(--ds-warning);
}

.ui-status-message[aria-busy="true"] {
  display: flex;
  align-items: center;
  gap: 9px;
  border-left-color: var(--ds-brand);
  color: var(--ds-text-secondary);
}

.ui-status-message[aria-busy="true"]::before {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border: 2px solid var(--ds-brand-border);
  border-top-color: var(--ds-brand);
  border-radius: 50%;
  content: "";
  animation: ui-status-spin 0.8s linear infinite;
}

.modal-panel[class*="drawer"],
.modal-panel.ui-drawer-panel {
  border-radius: var(--ds-radius-modal);
  box-shadow: var(--ds-shadow-modal);
}

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

@media (max-width: 680px) {
  .ui-filter-bar {
    align-items: stretch;
  }

  .ui-filter-bar :where(label, input, select, button, .button-link) {
    max-width: 100%;
  }

  .modal-head,
  .modal-body,
  .modal-actions {
    padding-right: 18px;
    padding-left: 18px;
  }

  .modal-actions > :where(button, .button-link) {
    flex: 1 1 132px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ui-status-message[aria-busy="true"]::before {
    animation: none;
  }
}

/* Responsive verification v39: keep every module usable from 320px to wide desktop. */
html,
body {
  min-width: 0;
}

.page input.sr-only,
.modal input.sr-only {
  width: 1px !important;
  min-width: 1px !important;
  max-width: 1px !important;
  height: 1px !important;
  min-height: 1px !important;
  margin: -1px !important;
  border: 0 !important;
  padding: 0 !important;
}

.modal-panel {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.modal-body {
  min-width: 0;
  min-height: 0;
  overscroll-behavior: contain;
}

#page-review .review-dashboard {
  grid-template-columns: minmax(0, 1fr);
}

#page-review .review-dashboard-grid {
  min-width: 0;
}

@media (max-width: 900px) {
  #page-home .home-dashboard-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-flow: row;
    grid-auto-columns: auto;
    overflow: visible;
    padding-bottom: 0;
    scroll-snap-type: none;
  }

  #page-home .home-dashboard-sidebar > .panel {
    min-height: 0;
    max-height: none;
    overflow: visible;
    scroll-snap-align: none;
  }

  #page-home .home-dashboard-sidebar .home-annual-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .workspace-topbar :where(button, [role="button"]),
  .page :where(button, .button-link, summary, [role="button"]),
  .modal :where(button, .button-link) {
    min-height: 44px !important;
  }

  .page :where(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea),
  .modal :where(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea) {
    min-height: 44px !important;
  }

  .workspace-topbar :where(.mobile-nav-toggle, .ui-icon-button),
  .page :where(.ui-icon-button, .icon-btn, button.ghost-btn),
  .modal :where(.ui-icon-button, .icon-btn, button.ghost-btn) {
    min-width: 44px;
  }

  .page :where(label.toggle-row, label.check-line, label.inline-check, label:has(> input[type="checkbox"]), label:has(> input[type="radio"])) {
    min-height: 44px;
    align-items: center;
  }

  #page-home .home-mini-calendar > button,
  #page-annual .annual-mini-days > button,
  #page-timetable .timetable-mobile-days > button {
    min-height: 44px !important;
  }

  #page-home :where(.today-card strong, .todo-item-copy strong, .highlight-copy strong, .highlight-copy span, .home-execution-item strong, .home-execution-item small),
  #page-annual :where(.annual-date-event-list strong, .annual-date-event-list small, .annual-grouped-task-list article > div strong, .annual-grouped-task-list article > div small),
  #page-honors :where(.honor-public-info h4, .showcase-story-content h3, .honor-public-meta span, .showcase-story-meta span),
  #page-timeline :where(.timeline-event-content h3, .timeline-event-content > footer > span, .timeline-draft-sources strong, .timeline-draft-sources small, .timeline-image-draft-list article strong),
  #page-resources :where(.resource-card h3, .resource-meta-row, .resource-file-row strong, .resource-tags span),
  #page-timetable :where(.timetable-mobile-course-head strong, .timetable-mobile-course-head a, .timetable-timeline-content strong, .timetable-timeline-content small),
  #page-learning :where(.practice-recent-item strong, .practice-recent-item small, .learning-priority-list article small),
  #page-training :where(.training-log-row-main strong, .training-log-row-main small, .training-log-row-main p, .training-log-row-next small),
  #page-review :where(.review-task-open strong, .review-task-open small, .review-paper-row strong, .review-paper-row small, .review-weak-row strong, .review-weak-row small),
  #page-automation :where(.agent-capability-card dd, .agent-task-item dd, .automation-rule-item .toggle-row strong, .automation-rule-item .toggle-row small, .automation-rule-item > footer strong, .automation-run-item > header strong),
  #page-export :where(.settings-operation-copy strong, .settings-operation-copy span, .backup-record-item strong, .backup-record-item small) {
    min-width: 0;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .modal-panel[class*="drawer"],
  .modal-panel.ui-drawer-panel,
  #page-honors .achievement-detail-drawer,
  #page-timeline .timeline-detail-panel {
    max-width: 100%;
    max-height: 100dvh;
  }
}

@media (max-width: 620px) {
  #page-home .home-dashboard-sidebar {
    grid-template-columns: minmax(0, 1fr);
  }

  #page-home .home-dashboard-sidebar .home-annual-panel {
    grid-column: auto;
  }

  #page-honors .achievement-detail-drawer,
  #page-timeline .timeline-detail-panel {
    width: 100%;
    border-radius: 0;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .workspace-topbar :where(button, [role="button"]),
  .page :where(button, .button-link, summary, [role="button"]),
  .modal :where(button, .button-link) {
    min-height: 40px !important;
  }

  .workspace-topbar :where(.ui-icon-button, .mobile-nav-toggle),
  .page :where(.ui-icon-button, .icon-btn, button.ghost-btn),
  .modal :where(.ui-icon-button, .icon-btn, button.ghost-btn) {
    min-width: 40px;
  }

  .page :where(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea),
  .modal :where(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea) {
    min-height: 42px !important;
  }

}

@media (max-width: 768px) {
  .page :where(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select),
  .modal :where(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select) {
    height: 44px !important;
    min-height: 44px !important;
    max-height: none !important;
  }
}

#page-annual .annual-tabs,
#page-annual .annual-tabs[aria-label] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 900px) {
  #page-annual .annual-tabs,
  #page-annual .annual-tabs[aria-label] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  #page-annual .annual-tabs,
  #page-annual .annual-tabs[aria-label] {
    grid-template-columns: 1fr;
  }
}

#page-domain-plan .annual-life-health-skincare .domain-care-products-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
}

#page-domain-plan .annual-life-health-skincare .domain-care-products-head > div.domain-care-products-actions {
  display: grid;
  min-width: 120px;
  align-content: start;
  justify-items: end;
  gap: 8px;
  border-left: 1px solid var(--ds-border);
  padding-left: 16px;
}

#page-domain-plan .annual-life-health-skincare .domain-care-products-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--ds-border);
}

#page-domain-plan .annual-life-health-skincare .domain-care-product-row {
  display: grid;
  grid-template-areas: none;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  align-content: start;
  gap: 9px;
  border: 0;
  border-right: 1px solid var(--ds-border);
  border-bottom: 1px solid var(--ds-border);
  padding: 14px 16px;
}

#page-domain-plan .annual-life-health-skincare .domain-care-product-row:nth-child(2n) {
  border-right: 0;
}

#page-domain-plan .annual-life-health-skincare .domain-care-product-row:nth-last-child(-n + 2) {
  border-bottom: 0;
}

#page-domain-plan .annual-life-health-skincare .domain-care-product-category {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

#page-domain-plan .annual-life-health-skincare .domain-care-product-row > label {
  display: grid;
  min-width: 0;
  gap: 4px;
}

#page-domain-plan .annual-life-health-skincare .domain-care-product-category,
#page-domain-plan .annual-life-health-skincare .domain-care-product-name,
#page-domain-plan .annual-life-health-skincare .domain-care-product-usage,
#page-domain-plan .annual-life-health-skincare .domain-care-product-links {
  grid-area: auto;
}

#page-domain-plan .annual-life-health-skincare .domain-care-product-row > label > span,
#page-domain-plan .annual-life-health-skincare .domain-care-product-links label > span {
  display: block;
}

#page-domain-plan .annual-life-health-skincare .domain-care-product-links {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 8px;
}

@media (max-width: 700px) {
  #page-domain-plan .annual-life-health-skincare .domain-care-products-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  #page-domain-plan .annual-life-health-skincare .domain-care-product-row,
  #page-domain-plan .annual-life-health-skincare .domain-care-product-row:nth-child(2n),
  #page-domain-plan .annual-life-health-skincare .domain-care-product-row:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--ds-border);
  }

  #page-domain-plan .annual-life-health-skincare .domain-care-product-row:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 430px) {
  #page-domain-plan .annual-life-health-skincare .domain-care-products-head {
    grid-template-columns: minmax(0, 1fr);
  }

  #page-domain-plan .annual-life-health-skincare .domain-care-products-head > div.domain-care-products-actions {
    min-width: 0;
    justify-items: start;
    border-top: 1px solid var(--ds-border);
    border-left: 0;
    padding-top: 10px;
    padding-left: 0;
  }

  #page-domain-plan .annual-life-health-skincare .domain-care-product-links {
    grid-template-columns: minmax(0, 1fr);
  }
}

#page-domain-plan .annual-life-health-skincare .domain-care-products-toolbar {
  border-top: 1px solid var(--ds-border);
  padding: 0 22px 16px;
}

#page-domain-plan .annual-life-health-skincare .domain-care-product-create {
  border: 1px solid var(--ds-border);
  border-radius: 14px;
  background: var(--ds-surface-subtle);
}

#page-domain-plan .annual-life-health-skincare .domain-care-product-create > summary {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  color: var(--ds-brand-strong);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  list-style: none;
}

#page-domain-plan .annual-life-health-skincare .domain-care-product-create > summary::-webkit-details-marker {
  display: none;
}

#page-domain-plan .annual-life-health-skincare .domain-care-product-create > summary::after {
  content: "+";
  color: var(--ds-text-muted);
  font-size: 18px;
  line-height: 1;
}

#page-domain-plan .annual-life-health-skincare .domain-care-product-create[open] > summary::after {
  content: "–";
}

#page-domain-plan .annual-life-health-skincare .domain-care-create-form {
  display: grid;
  grid-template-columns: minmax(132px, .7fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  border-top: 1px solid var(--ds-border);
  padding: 14px;
}

#page-domain-plan .annual-life-health-skincare .domain-care-create-form label {
  display: grid;
  min-width: 0;
  gap: 5px;
}

#page-domain-plan .annual-life-health-skincare .domain-care-create-form label span {
  color: var(--ds-text-muted);
  font-size: 10px;
  font-weight: 800;
}

#page-domain-plan .annual-life-health-skincare .domain-care-create-form :is(input, select) {
  width: 100%;
  min-height: 38px;
  border-color: var(--ds-border);
  background: var(--ds-surface);
  font-size: 12px;
}

#page-domain-plan .annual-life-health-skincare .domain-care-create-form button {
  align-self: end;
  min-height: 38px;
}

#page-domain-plan .annual-life-health-skincare .domain-care-products-grid {
  gap: 0;
}

#page-domain-plan .annual-life-health-skincare .domain-care-product-row {
  gap: 11px;
}

#page-domain-plan .annual-life-health-skincare .domain-care-product-row.is-empty {
  background: #fbfcff;
}

#page-domain-plan .annual-life-health-skincare .domain-care-product-primary {
  display: grid;
  min-width: 0;
  gap: 4px;
}

#page-domain-plan .annual-life-health-skincare .domain-care-product-primary strong {
  color: var(--ds-text);
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

#page-domain-plan .annual-life-health-skincare .domain-care-product-row.is-empty .domain-care-product-primary strong {
  color: var(--ds-text-muted);
}

#page-domain-plan .annual-life-health-skincare .domain-care-product-primary span {
  color: var(--ds-text-muted);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

#page-domain-plan .annual-life-health-skincare .domain-care-product-links {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 8px;
}

#page-domain-plan .annual-life-health-skincare .domain-care-product-links > span {
  display: grid;
  min-width: 0;
  gap: 4px;
  border: 1px solid var(--ds-border);
  border-radius: 12px;
  background: var(--ds-surface-subtle);
  padding: 8px 10px;
}

#page-domain-plan .annual-life-health-skincare .domain-care-product-links small {
  color: var(--ds-text-muted);
  font-size: 10px;
  font-weight: 800;
}

#page-domain-plan .annual-life-health-skincare .domain-care-product-links b {
  color: var(--ds-text-secondary);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

#page-domain-plan .annual-life-health-skincare .domain-care-product-links b.care-status-active {
  color: var(--ds-success);
}

#page-domain-plan .annual-life-health-skincare .domain-care-product-links b.care-status-paused {
  color: var(--ds-warning);
}

#page-domain-plan .annual-life-health-skincare .domain-care-product-links b.care-status-unset {
  color: var(--ds-text-muted);
}

@media (max-width: 980px) {
  #page-domain-plan .annual-life-health-skincare .domain-care-create-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  #page-domain-plan .annual-life-health-skincare .domain-care-products-toolbar {
    padding: 0 16px 14px;
  }

  #page-domain-plan .annual-life-health-skincare .domain-care-create-form,
  #page-domain-plan .annual-life-health-skincare .domain-care-product-links {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Module pages use their first work surface as the entry point.  The former
   descriptive banner is intentionally omitted; only real page-level actions
   remain in a compact utility row above the workspace. */
#page-annual > .annual-page-heading.page-header,
#page-domain-plan > .domain-plan-page-heading.page-header,
#page-honors > .achievement-page-heading.page-header,
#page-timeline > .timeline-page-heading.page-header,
#page-resources > .page-heading.page-header,
#page-timetable > .page-heading.page-header,
#page-automation > .page-heading.page-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 38px;
  margin: 0 0 12px;
  border: 0;
  background: transparent;
  padding: 0;
}

#page-annual > .annual-page-heading.page-header::before,
#page-domain-plan > .domain-plan-page-heading.page-header::before,
#page-honors > .achievement-page-heading.page-header::before,
#page-timeline > .timeline-page-heading.page-header::before,
#page-resources > .page-heading.page-header::before,
#page-timetable > .page-heading.page-header::before,
#page-automation > .page-heading.page-header::before {
  display: none;
}

#page-annual > .annual-page-heading.page-header .page-header-copy,
#page-domain-plan > .domain-plan-page-heading.page-header .page-header-copy,
#page-honors > .achievement-page-heading.page-header .page-header-copy,
#page-timeline > .timeline-page-heading.page-header .page-header-copy,
#page-resources > .page-heading.page-header .page-header-copy,
#page-timetable > .page-heading.page-header .page-header-copy,
#page-automation > .page-heading.page-header .page-header-copy {
  display: none;
}

#page-annual > .annual-page-heading.page-header .page-actions,
#page-domain-plan > .domain-plan-page-heading.page-header .page-actions,
#page-honors > .achievement-page-heading.page-header .page-actions,
#page-timeline > .timeline-page-heading.page-header .page-actions,
#page-resources > .page-heading.page-header .page-actions,
#page-timetable > .page-heading.page-header .page-actions,
#page-automation > .page-heading.page-header .page-actions {
  display: flex;
  grid-column: auto;
  grid-row: auto;
  align-items: center;
  justify-content: flex-end;
  width: auto;
  margin: 0 0 0 auto;
}

/* These workspaces have no page-level action.  Removing the empty header
   avoids leaving a visual gap before their first meaningful module. */
#page-learning > .page-heading.page-header,
#page-training > .page-heading.page-header,
#page-review > .page-heading.page-header,
#page-export > .page-heading.page-header {
  display: none;
}

#page-honors {
  gap: 16px;
}

@media (max-width: 768px) {
  #page-annual > .annual-page-heading.page-header,
  #page-domain-plan > .domain-plan-page-heading.page-header,
  #page-honors > .achievement-page-heading.page-header,
  #page-timeline > .timeline-page-heading.page-header,
  #page-resources > .page-heading.page-header,
  #page-timetable > .page-heading.page-header,
  #page-automation > .page-heading.page-header {
    min-height: 0;
    margin-bottom: 10px;
  }

  #page-annual > .annual-page-heading.page-header .page-actions,
  #page-domain-plan > .domain-plan-page-heading.page-header .page-actions,
  #page-honors > .achievement-page-heading.page-header .page-actions,
  #page-timeline > .timeline-page-heading.page-header .page-actions,
  #page-resources > .page-heading.page-header .page-actions,
  #page-timetable > .page-heading.page-header .page-actions,
  #page-automation > .page-heading.page-header .page-actions {
    justify-content: flex-end;
  }
}

@media (max-width: 520px) {
  #page-annual > .annual-page-heading.page-header .page-actions,
  #page-domain-plan > .domain-plan-page-heading.page-header .page-actions,
  #page-honors > .achievement-page-heading.page-header .page-actions,
  #page-timeline > .timeline-page-heading.page-header .page-actions,
  #page-resources > .page-heading.page-header .page-actions,
  #page-timetable > .page-heading.page-header .page-actions,
  #page-automation > .page-heading.page-header .page-actions {
    width: 100%;
  }
}

/* Review filter: keep the scope label and its selector as one readable unit. */
#page-review .review-dashboard-toolbar {
  align-items: center;
  min-height: 52px;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-card);
  background: var(--ds-surface-subtle);
  padding: 8px 12px;
}

#page-review .review-dashboard-toolbar label {
  flex: 0 0 auto;
  min-width: max-content;
  white-space: nowrap;
}

#page-review .review-dashboard-toolbar label > span {
  flex: 0 0 auto;
  white-space: nowrap;
}

#page-review .review-dashboard-toolbar select {
  width: 164px;
  min-width: 164px;
  flex: 0 0 164px;
}

#page-review .review-dashboard-toolbar > span {
  margin-left: auto;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 620px) {
  #page-review .review-dashboard-toolbar {
    flex-direction: row;
    flex-wrap: wrap;
  }

  #page-review .review-dashboard-toolbar label {
    display: flex;
    width: 100%;
  }

  #page-review .review-dashboard-toolbar select {
    width: auto;
    min-width: 0;
    flex: 1 1 0;
  }

  #page-review .review-dashboard-toolbar > span {
    flex-basis: 100%;
    margin-left: 0;
  }
}
