body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Arial, sans-serif;
  background: #d9d9d9;
  color: #1a2744;
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  box-sizing: border-box;
}

body.onboarding-active {
  background: #fff;
}

.card {
  width: 100%;
  max-width: 520px;
  background: #efefef;
  border: 1px solid #b8b8b8;
  border-radius: 2px;
  padding: 28px 32px 32px;
  box-sizing: border-box;
}

.view.hidden {
  display: none;
}

.card-title {
  margin: 0 0 16px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.25;
  color: #1a2744;
}

.card-lead {
  margin: 0 0 12px;
  font-size: 0.95rem;
  line-height: 1.45;
  color: #1a2744;
}

.card-hint {
  margin: 0 0 20px;
  font-size: 0.82rem;
  line-height: 1.45;
  font-style: italic;
  color: #6a6a6a;
}

.gate-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field-label {
  font-size: 0.78rem;
  color: #1a2744;
}

.field input {
  font: inherit;
  font-size: 1rem;
  padding: 10px 12px;
  border: 1px solid #1a2744;
  border-radius: 2px;
  background: #fff;
  color: #1a2744;
}

.field input:focus {
  outline: 2px solid #1a2744;
  outline-offset: 1px;
}

.form-error {
  margin: 0;
  font-size: 0.85rem;
  color: #8b2e2e;
}

.form-error.hidden {
  display: none;
}

.channel-switch {
  margin: 0;
  font-size: 0.88rem;
}

.link-button {
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: inherit;
  color: #1a2744;
  text-decoration: underline;
  cursor: pointer;
}

.link-button:hover {
  color: #0f1a30;
}

.link-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.separator {
  margin: 0 6px;
  color: #6a6a6a;
}

.primary-button {
  margin-top: 8px;
  padding: 14px 20px;
  border: none;
  border-radius: 6px;
  background: #1a2744;
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.primary-button:hover {
  background: #0f1a30;
}

.primary-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.workspace-placeholder {
  margin: 16px 0 0;
  padding: 12px;
  background: #e4e4e4;
  border: 1px dashed #9a9a9a;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #4a4a4a;
}

.welcome-card {
  width: 100%;
  max-width: 720px;
  background: #fff;
  border: none;
  border-radius: 0;
  padding: 40px 48px 48px;
  box-sizing: border-box;
  text-align: center;
}

.welcome-title {
  margin: 0 0 24px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.3;
  color: #1a2744;
}

.welcome-body {
  margin: 0 0 16px;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #5a5a5a;
  text-align: center;
}

.onboarding-form {
  margin-top: 28px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.consent-row input {
  margin-top: 3px;
  flex-shrink: 0;
}

.consent-text {
  font-size: 0.82rem;
  line-height: 1.45;
  font-style: italic;
  color: #5a5a5a;
}

.privacy-link-row {
  margin: 8px 0 0;
  text-align: center;
}

.privacy-link {
  font-size: 0.88rem;
  font-style: italic;
  color: #3d6fa8;
}

.privacy-link:hover {
  color: #2a5080;
}

#onboarding-start-btn {
  align-self: center;
  min-width: 200px;
  margin-top: 12px;
}

body.workspace-active {
  background: #eef1f5;
}

body.workspace-active .page {
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  min-height: 100vh;
}

.portfolio-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: #eef1f5;
}

.portfolio-topbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: #fff;
  border-bottom: 1px solid #d8dee8;
}

.topbar-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.topbar-logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: #1a2744;
}

.topbar-tagline {
  font-size: 0.78rem;
  color: #6a7385;
}

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

.topbar-save {
  margin-top: 0;
  padding: 10px 18px;
  font-size: 0.85rem;
}

.secondary-icon-button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #c5cdd8;
  background: #fff;
  cursor: pointer;
  color: #1a2744;
}

.portfolio-body {
  --pane-left-width: 260px;
  --pane-right-width: 320px;
  --pane-splitter-size: 8px;
  flex: 1;
  display: grid;
  grid-template-columns:
    var(--pane-left-width)
    var(--pane-splitter-size)
    minmax(0, 1fr)
    var(--pane-splitter-size)
    var(--pane-right-width);
  gap: 0;
  min-height: 0;
  overflow: hidden;
}

.portfolio-body.portfolio-body--resizing {
  cursor: col-resize;
  user-select: none;
}

.pane-splitter {
  position: relative;
  z-index: 2;
  min-width: 0;
  cursor: col-resize;
  background: #e2e8f0;
  border-left: 1px solid #c5cdd8;
  border-right: 1px solid #c5cdd8;
  touch-action: none;
}

.pane-splitter::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  margin-top: -2px;
  margin-left: -2px;
  border-radius: 50%;
  background: #6a7385;
  box-shadow:
    0 -10px 0 #6a7385,
    0 10px 0 #6a7385;
  opacity: 0.85;
  pointer-events: none;
}

.pane-splitter::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -5px;
  right: -5px;
}

.pane-splitter:hover {
  background: #cfd8e3;
}

.pane-splitter:hover::before {
  background: #3d6fa8;
  box-shadow:
    0 -10px 0 #3d6fa8,
    0 10px 0 #3d6fa8;
  opacity: 1;
}

.pane-splitter.is-dragging,
.portfolio-body.portfolio-body--resizing .pane-splitter {
  background: #b8c4d4;
}

.pane-splitter.is-dragging::before,
.portfolio-body.portfolio-body--resizing .pane-splitter::before {
  background: #1a2744;
  box-shadow:
    0 -10px 0 #1a2744,
    0 10px 0 #1a2744;
}

.pane-splitter:focus-visible {
  outline: 2px solid #3d6fa8;
  outline-offset: -2px;
}

.pane-left {
  border-right: none;
  display: flex;
  flex-direction: column;
  padding: 0;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.pane-left-content,
.pane-right-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.pane-aux-strip {
  display: none;
  flex: 1;
  width: 100%;
  min-height: 0;
  border: none;
  padding: 8px 4px;
  cursor: pointer;
  background: #eef2f7;
  color: #1a2744;
}

.pane-aux-strip--left {
  border-right: 1px solid #c5cdd8;
}

.pane-aux-strip--right {
  border-left: 1px solid #c5cdd8;
  background: #f4f6fb;
}

.pane-aux-strip:hover {
  background: #dfe8f2;
}

.pane-aux-strip-label {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pane-aux-strip-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #3d6fa8;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
}

.portfolio-body.portfolio-body--aux {
  grid-template-columns:
    var(--pane-left-width)
    0
    minmax(0, 1fr)
    0
    var(--pane-right-width);
}

.portfolio-body.portfolio-body--aux .pane-splitter {
  width: 0;
  min-width: 0;
  max-width: 0;
  padding: 0;
  margin: 0;
  border: none;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
}

.portfolio-body.portfolio-body--aux:not(.portfolio-body--aux-left-expanded):not(.portfolio-body--aux-right-expanded) .pane-left-content,
.portfolio-body.portfolio-body--aux:not(.portfolio-body--aux-left-expanded):not(.portfolio-body--aux-right-expanded) .pane-right-content {
  display: none;
}

.portfolio-body.portfolio-body--aux:not(.portfolio-body--aux-left-expanded):not(.portfolio-body--aux-right-expanded) .pane-aux-strip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 16px;
}

.portfolio-body.portfolio-body--aux.portfolio-body--aux-left-expanded .pane-aux-strip--left,
.portfolio-body.portfolio-body--aux.portfolio-body--aux-right-expanded .pane-aux-strip--right {
  display: none;
}

.portfolio-body.portfolio-body--aux.portfolio-body--aux-left-expanded:not(.portfolio-body--aux-right-expanded) .pane-aux-strip--right {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 16px;
}

.portfolio-body.portfolio-body--aux.portfolio-body--aux-right-expanded:not(.portfolio-body--aux-left-expanded) .pane-aux-strip--left {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 16px;
}

.portfolio-body.portfolio-body--aux.portfolio-body--aux-left-expanded .pane-right-content,
.portfolio-body.portfolio-body--aux.portfolio-body--aux-right-expanded:not(.portfolio-body--aux-left-expanded) .pane-left-content {
  display: none;
}

.portfolio-body.portfolio-body--aux.portfolio-body--aux-left-expanded .pane-left-content,
.portfolio-body.portfolio-body--aux.portfolio-body--aux-right-expanded .pane-right-content {
  display: flex;
}

.portfolio-body.portfolio-body--aux.portfolio-body--aux-left-expanded .field-row-two-col,
.portfolio-body.portfolio-body--aux.portfolio-body--aux-right-expanded .field-row-two-col {
  grid-template-columns: 1fr;
}

.portfolio-body.portfolio-body--assistant-collapsed .pane-right-content {
  display: none;
}

.portfolio-body.portfolio-body--assistant-collapsed .pane-aux-strip--right {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 16px;
}

.portfolio-body.portfolio-body--assistant-collapsed #pane-splitter-right {
  pointer-events: none;
  opacity: 0;
}

.pane-left-header {
  flex-shrink: 0;
  padding: 16px 12px 0;
}

.section-tree {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 12px;
}

.pane-left-footer {
  flex-shrink: 0;
  margin-top: 0;
  padding: 12px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}

.pane-center {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  background: #f7f9fc;
}

.section-header {
  flex-shrink: 0;
  padding: 24px 28px 0;
  background: #f7f9fc;
}

.section-content {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 16px 28px 24px;
}

.section-blocks-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 14px 28px 18px;
  border-top: 1px solid #d8dee8;
  background: #f7f9fc;
}

.section-blocks-footer.hidden {
  display: none;
}

.section-add-block-btn {
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 10px 18px;
  border: 1px solid #8ecf9a;
  border-radius: 8px;
  background: #e8f7eb;
  color: #1a4d28;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(26, 77, 40, 0.08);
}

.section-add-block-btn:hover {
  background: #d9f0de;
  border-color: #6fc07f;
  color: #143d1f;
}

.section-add-block-btn:active {
  background: #c8e8cf;
}

.form-block.block-attention-flash {
  animation: block-attention-flash 3s ease-out forwards;
}

@keyframes block-attention-flash {
  0% {
    box-shadow:
      0 0 0 3px rgba(61, 111, 168, 0.65),
      0 0 28px rgba(61, 111, 168, 0.35);
  }
  70% {
    box-shadow:
      0 0 0 2px rgba(61, 111, 168, 0.25),
      0 0 12px rgba(61, 111, 168, 0.12);
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

.pane-right {
  border-left: none;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: #fff;
}

.assistant-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.assistant-aux-collapse {
  display: none;
  flex-shrink: 0;
}

.portfolio-body:not(.portfolio-body--assistant-collapsed):not(.portfolio-body--aux) .assistant-aux-collapse,
.portfolio-body.portfolio-body--aux.portfolio-body--aux-right-expanded:not(.portfolio-body--aux-left-expanded) .assistant-aux-collapse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.assistant-messages {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.assistant-footer {
  flex-shrink: 0;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}

.field-row-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 0;
}

.field-row-two-col .workspace-field {
  margin-bottom: 16px;
}

.section-form-card-header,
.form-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.form-block-header.form-block-header--indexed {
  margin: -18px -20px 16px;
  padding: 14px 20px 12px;
  border-bottom: 1px solid rgba(26, 39, 68, 0.08);
  border-radius: 10px 10px 0 0;
}

.form-block-header--tint-0 {
  background: #e8f4fc;
}

.form-block-header--tint-1 {
  background: #eef6e8;
}

.form-block-header--tint-2 {
  background: #f3eef9;
}

.form-block-header--tint-3 {
  background: #fef5e8;
}

.form-block-header--tint-4 {
  background: #fceef0;
}

.form-block-header--tint-5 {
  background: #e6f7f4;
}

.section-form-card-title,
.form-block-header h2,
.form-block-header-title {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a2744;
}

.section-work-toggle-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: flex-start;
  padding: 10px 0 14px;
  margin-top: 4px;
  border-top: 1px solid #e2e8f0;
}

.section-work-toggle-row.hidden {
  display: none;
}

.section-work-toggle-all-btn {
  flex-shrink: 0;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  background: #e8eef5;
  color: #1a2744;
  text-decoration: none;
  cursor: pointer;
}

.section-work-toggle-all-btn:hover {
  background: #dce6f2;
}

.section-order-hint {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 0.82rem;
  color: #5a6478;
  line-height: 1.4;
}

.form-block-header-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.form-block-expand-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(26, 39, 68, 0.14);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  color: #1a2744;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1;
}

.form-block-expand-button:hover {
  border-color: rgba(61, 111, 168, 0.45);
  background: rgba(255, 255, 255, 0.95);
  color: #3d6fa8;
}

.form-block-expand-button:focus-visible {
  outline: 2px solid #3d6fa8;
  outline-offset: 1px;
}

.form-block-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.55);
  color: #4a5568;
  cursor: grab;
  flex-shrink: 0;
}

.form-block-drag-handle:active {
  cursor: grabbing;
}

.form-block-drag-handle:hover {
  border-color: rgba(61, 111, 168, 0.35);
  background: rgba(255, 255, 255, 0.9);
  color: #1a2744;
}

.form-block-row--work {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin-bottom: 10px;
  position: relative;
}

.form-block-row--work-grip-spacer {
  width: 32px;
  min-height: 28px;
}

.form-block-row--work-collapsed {
  align-items: center;
}

.form-block-row--work-collapsed .form-block-drag-handle {
  align-self: center;
  background: #eef2f7;
  border: none;
}

.form-block-row--work-collapsed .form-block-drag-handle:hover {
  background: #dfe8f2;
  border: none;
}

.form-block-list--drag-active .form-block-row--work.form-block-row--dragging {
  opacity: 0.45;
}

.form-block-row--work.form-block-row--dragging .form-block {
  border: 2px dashed #3d6fa8;
  background: #f0f7ff;
}

.section-content.form-block-list--drag-active {
  cursor: grabbing;
}

.form-block-row--drop-before::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 4px;
  background: #3d6fa8;
  box-shadow: 0 0 0 2px rgba(61, 111, 168, 0.25);
  z-index: 2;
}

.form-block-row--drop-after::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 4px;
  background: #3d6fa8;
  box-shadow: 0 0 0 2px rgba(61, 111, 168, 0.25);
  z-index: 2;
}

.form-block.block-reorder-flash {
  animation: block-reorder-flash 1.4s ease-out forwards;
}

@keyframes block-reorder-flash {
  0% {
    box-shadow:
      0 0 0 3px rgba(46, 125, 79, 0.7),
      0 0 24px rgba(46, 125, 79, 0.35);
    border-color: #2e7d4f;
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
    border-color: #d8dee8;
  }
}

.tree-section-order-note {
  font-weight: 400;
  font-size: 0.82rem;
  color: #6a7385;
}

.section-form-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.clear-ai-drafts-button,
.accept-ai-drafts-button {
  border: 1px solid #9b7fd4;
  background: #f5f0ff;
  color: #5a3d91;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}

.accept-ai-drafts-button:hover,
.clear-ai-drafts-button:hover {
  background: #ebe0ff;
  border-color: #7c5cbf;
}

.ai-draft-dismiss-button {
  border: none;
  background: #eef1f5;
  color: #5a6478;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
}

.ai-draft-dismiss-button:hover {
  background: #fdecea;
  color: #a93226;
}

.delete-block-button {
  border: none;
  background: transparent;
  color: #a93226;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}

.delete-block-button:hover {
  background: #fdecea;
}

.ai-drafts-button {
  border: 1px solid #9b7fd4;
  background: #f5f0ff;
  color: #5a3d91;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}

.pane-label {
  margin: 0 0 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1a2744;
}

.completion-text {
  margin: 0 0 8px;
  font-size: 0.78rem;
  color: #6a7385;
}

.completion-bar {
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 16px;
}

.completion-bar-fill {
  height: 100%;
  width: 0;
  background: #3d6fa8;
  transition: width 0.2s ease;
}

.section-tree {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tree-group-title {
  margin: 0 0 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #1a2744;
}

.tree-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tree-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  border: none;
  border-radius: 6px;
  background: transparent;
  font: inherit;
  font-size: 0.88rem;
  color: #1a2744;
  cursor: pointer;
}

.tree-item:hover:not(.selected) {
  background: #f0f4f8;
}

.tree-item.selected {
  background: #d4e8f7;
  font-weight: 600;
  color: #1a2744;
  box-shadow: none;
}

.tree-item.selected::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 0;
  bottom: 5px;
  width: 6px;
  border-radius: 4px 0 0 4px;
  background: #1a2744;
}

.tree-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  column-gap: 4px;
  align-items: stretch;
}

.tree-section-branch {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  column-gap: 4px;
  row-gap: 2px;
}

.tree-section-branch > .tree-row--branch {
  display: contents;
}

.tree-expand-spacer {
  display: block;
  width: 36px;
}

.tree-expand-button {
  align-self: center;
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #c5cdd8;
  background: #fff;
  color: #1a2744;
  cursor: pointer;
  border-radius: 6px;
  flex-shrink: 0;
}

.tree-expand-button:hover {
  background: #f0f4f8;
  border-color: #3d6fa8;
  color: #3d6fa8;
}

.tree-expand-button:focus-visible {
  outline: 2px solid #3d6fa8;
  outline-offset: 1px;
}

.tree-block-list {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 0 6px 8px;
}

.tree-block-item {
  position: relative;
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  background: transparent;
  font: inherit;
  font-size: 0.8rem;
  line-height: 1.35;
  color: #4a5568;
  cursor: pointer;
}

.tree-block-item:hover:not(.selected) {
  background: #f0f4f8;
  color: #1a2744;
}

.tree-block-item.selected {
  background: #d4e8f7;
  font-weight: 600;
  color: #1a2744;
}

.tree-block-item.selected::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 0;
  bottom: 4px;
  width: 5px;
  border-radius: 4px 0 0 4px;
  background: #1a2744;
}

.form-block.tree-block-selected {
  box-shadow: 0 0 0 2px rgba(61, 111, 168, 0.35);
}

.tree-attention-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3d6fa8;
  flex-shrink: 0;
}

.section-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.section-header-row .section-title {
  margin: 0;
  flex: 1;
  font-family: inherit;
  font-size: 1.65rem;
  font-weight: 700;
  color: #1a2744;
}

.pane-left-footer {
  margin-top: 0;
}

.finalize-button {
  width: 100%;
  margin-top: 0;
}

.finalize-hint {
  margin: 8px 0 16px;
  font-size: 0.72rem;
  color: #6a7385;
  line-height: 1.4;
}

.profile-card {
  display: flex;
  gap: 10px;
  align-items: center;
}

.profile-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #1a2744;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}

.profile-name {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
}

.profile-role {
  margin: 0;
  font-size: 0.75rem;
  color: #6a7385;
}

.profile-link {
  font-size: 0.75rem;
}

.section-title {
  margin: 0 0 16px;
  font-family: inherit;
  font-size: 1.65rem;
  font-weight: 700;
  color: #1a2744;
}

.attention-navigators {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.attention-navigators--stacked {
  flex-direction: column;
}

.attention-navigators--stacked .attention-card {
  flex: none;
  width: 100%;
  min-width: 0;
}

.attention-card {
  flex: 1;
  min-width: min(100%, 280px);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid;
}

.attention-card-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
}

.attention-icon-incomplete {
  color: #d4882a;
}

.attention-icon-ai {
  color: #7c5cbf;
}

.attention-card-body {
  flex: 1;
  min-width: 0;
}

.attention-incomplete {
  background: #fff8ed;
  border-color: #e8a84a;
}

.attention-ai {
  background: #f5f0ff;
  border-color: #9b7fd4;
}

.attention-title {
  margin: 0 0 2px;
  font-weight: 700;
  font-size: 0.92rem;
  color: #1a2744;
}

.attention-hint {
  margin: 0;
  font-size: 0.78rem;
  color: #5a6478;
  line-height: 1.35;
}

.attention-nav {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  color: #5a6478;
}

.attention-counter {
  font-size: 1.1rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  min-width: 4.75rem;
  text-align: center;
  letter-spacing: 0.01em;
}

.attention-counter--active {
  font-size: 1.28rem;
  font-weight: 700;
  color: #1a2744;
}

.attention-nav--active .attention-arrow {
  border-color: #9bafc8;
  background: #f8fafc;
}

.attention-arrow {
  border: 1px solid #c5cdd8;
  background: #fff;
  border-radius: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  font-size: 1.55rem;
  line-height: 1;
  color: #1a2744;
  cursor: pointer;
}

.attention-arrow:disabled {
  opacity: 0.45;
  cursor: default;
}

.workspace-field.field-attention-highlight {
  position: relative;
  z-index: 1;
  border-radius: 6px;
}

.field-incomplete.field-attention-highlight {
  animation: field-attention-rim-incomplete 1.1s ease-in-out 3;
}

.field-ai-draft.field-attention-highlight input,
.field-ai-draft.field-attention-highlight textarea,
.field-ai-draft.field-attention-highlight select,
.field-ai-draft.field-attention-highlight .month-year-text-input {
  animation: field-ai-draft-attention-bg 1.1s ease-in-out 1;
}

@keyframes field-attention-rim-incomplete {
  0%, 100% {
    box-shadow:
      0 0 0 2px rgba(232, 168, 74, 0.55),
      0 0 10px rgba(232, 168, 74, 0.2);
  }
  50% {
    box-shadow:
      0 0 0 3px rgba(230, 130, 30, 0.95),
      0 0 22px rgba(232, 168, 74, 0.55);
  }
}

@keyframes field-ai-draft-attention-bg {
  0%, 100% {
    background-color: #fffbeb;
    box-shadow:
      0 0 0 1px rgba(155, 127, 212, 0.25),
      inset 0 0 0 rgba(255, 180, 80, 0);
  }
  50% {
    background-color: #ffe8c8;
    box-shadow:
      0 0 0 1px rgba(210, 140, 60, 0.45),
      inset 0 0 18px rgba(255, 165, 70, 0.35);
  }
}

.workspace-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.workspace-field-label-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}

.workspace-field-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #1a2744;
}

.workspace-field-required {
  color: #b45309;
  font-weight: 700;
  margin-left: 2px;
}

.workspace-field input,
.workspace-field textarea,
.workspace-field select {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid #b8c2d0;
  border-radius: 4px;
  background: #fff;
}

.month-year-field-row {
  display: flex;
  align-items: stretch;
  width: 100%;
  position: relative;
}

.month-year-picker-button {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid #b8c2d0;
  border-right: none;
  border-radius: 4px 0 0 4px;
  background: #f0f4f8;
  color: #1a2744;
  cursor: pointer;
}

.month-year-picker-button:hover {
  background: #e4ebf3;
}

.month-year-picker-native {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  left: 0;
  bottom: 0;
}

.month-year-text-input {
  flex: 1;
  min-width: 0;
  font: inherit;
  padding: 10px 12px;
  border: 1px solid #b8c2d0;
  border-radius: 0 4px 4px 0;
  background: #fff;
}

.field-format-invalid .month-year-text-input,
.field-date-invalid .month-year-text-input {
  border-color: #c0392b;
  color: #922b21;
}

.field-format-invalid .month-year-picker-button,
.field-date-invalid .month-year-picker-button {
  border-color: #c0392b;
  color: #922b21;
  background: #fdecea;
}

.field-format-invalid input,
.field-format-invalid textarea,
.field-format-invalid select {
  border-color: #c0392b;
  color: #922b21;
}

.field-format-invalid.field-incomplete input,
.field-format-invalid.field-incomplete textarea,
.field-format-invalid.field-incomplete select,
.field-format-invalid.field-incomplete .month-year-text-input,
.field-date-invalid.field-incomplete .month-year-text-input {
  border-color: #c0392b;
}

.workspace-field-error {
  font-size: 0.78rem;
  color: #c0392b;
  line-height: 1.35;
}

.workspace-field-error.hidden {
  display: none;
}

.field-incomplete input,
.field-incomplete textarea,
.field-incomplete select {
  border-color: #e8a84a;
}

.field-ai-draft input,
.field-ai-draft textarea,
.field-ai-draft select {
  background: #fffbeb;
  border-color: #d4c4a8;
  box-shadow: 0 0 0 1px rgba(155, 127, 212, 0.25);
}

.field-ai-draft .month-year-text-input {
  background: #fffbeb;
  border-color: #d4c4a8;
  box-shadow: 0 0 0 1px rgba(155, 127, 212, 0.25);
}

.field-ai-draft.field-format-invalid .month-year-text-input,
.field-ai-draft.field-date-invalid .month-year-text-input {
  border-color: #c0392b;
  box-shadow: none;
}

.field-ai-draft.field-format-invalid input,
.field-ai-draft.field-format-invalid textarea,
.field-ai-draft.field-format-invalid select {
  border-color: #c0392b;
  box-shadow: none;
}

.ai-draft-field-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.ai-draft-button {
  border: none;
  background: #e8f7eb;
  color: #1a4d28;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 4px;
  cursor: pointer;
}

.ai-draft-button:hover {
  background: #d9f0de;
}

.field-group-title {
  margin: 16px 0 10px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a2744;
}

.field-group-title:first-child {
  margin-top: 0;
}

.section-form-card,
.form-block {
  background: #fff;
  border: 1px solid #d8dee8;
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 16px;
}

.form-block-row--work > .form-block {
  margin-bottom: 0;
}

.form-block.form-block--collapsed {
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.form-block.form-block--collapsed .form-block-header {
  margin-bottom: 0;
}

.form-block.form-block--collapsed .form-block-header.form-block-header--indexed {
  margin: 0;
  border-radius: 10px;
  border-bottom: none;
}

.section-placeholder {
  color: #6a7385;
  font-size: 0.92rem;
  line-height: 1.5;
}

.assistant-header {
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
}

.assistant-identity {
  display: flex;
  gap: 10px;
  align-items: center;
}

.assistant-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1a2744;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.assistant-name {
  margin: 0;
  font-weight: 700;
  font-size: 0.95rem;
}

.assistant-status {
  margin: 0;
  font-size: 0.75rem;
  color: #6a7385;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #2ea84a;
  border-radius: 50%;
  margin-right: 4px;
}

.assistant-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.assistant-bubble {
  max-width: 92%;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.assistant-ai {
  align-self: flex-start;
  background: #f0f4f8;
  color: #1a2744;
}

.assistant-user {
  align-self: flex-end;
  background: #1a2744;
  color: #fff;
}

.assistant-footer-actions {
  display: flex;
  justify-content: flex-end;
  padding: 10px 16px 0;
}

.assistant-undo-button {
  border: none;
  background: transparent;
  color: #3d6fa8;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.assistant-undo-button:hover:not(.is-inactive) {
  background: #f0f4f8;
  text-decoration: underline;
}

.assistant-undo-button.is-inactive {
  color: #a8b0bd;
  cursor: default;
}

.assistant-compose {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 8px 16px 0;
}

.assistant-compose-input-wrap {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid #c5cdd8;
  border-radius: 6px;
  background: #fff;
}

.assistant-compose-input-wrap:focus-within {
  border-color: #3d6fa8;
  box-shadow: 0 0 0 2px rgba(61, 111, 168, 0.15);
}

.assistant-mic-button {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 1px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #5a6478;
  cursor: pointer;
}

.assistant-mic-button:hover:not(:disabled) {
  background: #f0f4f8;
  color: #1a2744;
}

.assistant-mic-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.assistant-mic-button.assistant-mic-active {
  color: #c0392b;
  background: #fdecea;
}

.assistant-compose textarea {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 22px;
  margin: 0;
  padding: 4px 2px;
  border: none;
  resize: none;
  overflow-y: hidden;
  box-sizing: border-box;
  font: inherit;
  line-height: 1.45;
  background: transparent;
}

.assistant-compose-input-wrap:has(textarea.assistant-input-listening) {
  background: #e8f2fb;
  border-color: #3d6fa8;
}

.assistant-compose textarea.assistant-input-listening {
  background: #e8f2fb;
}

.assistant-compose textarea:focus {
  outline: none;
}

.assistant-compose textarea.assistant-input-listening::placeholder {
  color: #3d6fa8;
  font-weight: 600;
  opacity: 1;
}

.assistant-send {
  margin-top: 0;
  padding: 10px 16px;
}

.assistant-disclaimer {
  margin: 0;
  padding: 0 16px 12px;
  font-size: 0.7rem;
  color: #8a94a6;
}

.save-status {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: #1a2744;
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  z-index: 10;
}

.save-status.hidden {
  display: none;
}
