/* Projects */
.project-header {
  margin-bottom: 32px;
}

.project-header h1 {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 400;
  color: var(--text);
}

.project-header .part-label {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.project-layout {
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

.project-ideas {
  width: 340px;
  min-width: 340px;
  position: sticky;
  top: 0;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}

.project-ideas-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.project-idea-item {
  display: flex;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

.project-idea-item.done .project-idea-text {
  text-decoration: line-through;
  color: var(--text-light);
}

.project-idea-check {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 50%;
  flex-shrink: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 3px;
  transition: all 0.15s;
}

.project-idea-check:hover {
  border-color: var(--accent);
}

.project-idea-check.checked {
  background: var(--accent);
  border-color: var(--accent);
}

.project-idea-check.checked::after {
  content: '✓';
  color: white;
  font-size: 11px;
}

.project-idea-text {
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  flex: 1;
}

.project-idea-highlights-count {
  font-size: 11px;
  color: var(--text-light);
  cursor: pointer;
}

.project-idea-highlights-count:hover {
  color: var(--text-muted);
}

.project-idea-highlights {
  display: none;
  padding-left: 28px;
  padding-bottom: 8px;
}

.project-idea-highlights.open {
  display: block;
}

.project-idea-highlight {
  font-family: var(--serif);
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
  font-style: italic;
  padding: 6px 0;
  border-bottom: 1px solid var(--highlight-bg);
}

.project-idea-source {
  font-family: var(--sans);
  font-size: 10px;
  color: var(--text-light);
}

.project-writing {
  flex: 1;
  min-width: 0;
}

.project-writing-area {
  font-family: var(--serif);
  font-size: var(--writing-size);
  line-height: var(--writing-lh);
  width: 100%;
  min-height: 500px;
  border: none;
  outline: none;
  resize: none;
  color: var(--text);
  background: transparent;
  padding: 0;
}

.project-writing-area:empty::before {
  content: attr(data-placeholder);
  color: var(--text-light);
  font-style: italic;
  pointer-events: none;
}

.project-writing-area h1 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 600;
  margin: 24px 0 8px;
  line-height: 1.3;
}

.project-writing-area h2 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  margin: 20px 0 6px;
  line-height: 1.35;
}

.project-writing-area h3 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  margin: 16px 0 4px;
  line-height: 1.4;
}

.project-writing-area blockquote {
  border-left: 3px solid var(--highlight-border);
  padding-left: 16px;
  margin: 12px 0;
  color: var(--text-muted);
  font-style: italic;
}

.project-writing-area ul,
.project-writing-area ol {
  margin: 8px 0;
  padding-left: 24px;
}

.project-writing-area li {
  margin: 4px 0;
}

.project-writing-area a {
  color: var(--accent);
  text-decoration: underline;
}

/* Toolbar */
.editor-toolbar {
  display: flex;
  gap: 2px;
  padding: 6px 8px;
  background: var(--sidebar-bg);
  border-radius: 6px;
  margin-bottom: 16px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.toolbar-btn {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--sidebar-text);
  background: none;
  border: none;
  border-radius: 4px;
  padding: 5px 10px;
  cursor: pointer;
  transition: all 0.12s;
  line-height: 1;
}

.toolbar-btn:hover {
  background: rgba(255,255,255,0.1);
  color: var(--sidebar-active);
}

.toolbar-btn.active {
  background: rgba(255,255,255,0.15);
  color: white;
}

.toolbar-divider {
  width: 1px;
  background: rgba(255,255,255,0.12);
  margin: 2px 4px;
}

.toolbar-btn .kbd {
  font-size: 10px;
  opacity: 0.4;
  margin-left: 4px;
}

.project-progress {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
  margin-bottom: 24px;
}

.project-progress-bar {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}

.project-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s;
}

.project-idea-remove {
  font-size: 11px;
  color: var(--text-light);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
  flex-shrink: 0;
}

.project-idea-item:hover .project-idea-remove {
  opacity: 1;
}

.project-idea-remove:hover {
  color: #c44;
}
