/* DB-VISUAL-SYSTEM-01
   Reuses the existing V0.2.3 tokens; module-local alignment only. */

/* DB-UI-DESIGN-SYSTEM-05: map the existing type scale only inside the three
   modules in scope. Other accepted pages keep their current title geometry. */
.app-shell.projects-section,
.app-shell.keyword-section,
.app-shell.inbox-section {
  --db-type-title-size: 28px;
  --db-type-title-weight: 700;
  --db-type-section-size: 18px;
  --db-type-section-weight: 600;
  --db-type-body-size: 13px;
  --db-type-body-leading: 1.4;
  --db-type-secondary: #68778F;
  --db-type-tertiary: #8A97AB;
  --db-type-menu-size: 13px;
  --db-type-menu-weight: 500;
  --db-type-menu-leading: 1.3;
}

/* Shared title geometry. Asset Library and Inbox use the real topbar; the
   other modules expose the same title bar dimensions in their own shell. */
.topbar,
.answer-book-header {
  min-height: var(--db-titlebar-min-height);
  padding: var(--db-titlebar-padding);
}

.heading h1,
.inbox-section .topbar .heading h1,
.workbench-home-header h1,
.projects-page h1,
.answer-book-header .answer-module-title {
  margin: 0;
  color: var(--db-type-primary);
  font-size: var(--db-type-title-size);
  font-weight: var(--db-type-title-weight);
  line-height: var(--db-type-title-leading);
  letter-spacing: var(--db-type-title-tracking);
}

.answer-book-header .answer-module-title { display: block; }
.answer-book-header .answer-conversation-title {
  color: var(--db-type-primary);
  font-size: var(--db-type-section-size);
  font-weight: var(--db-type-section-weight);
  line-height: 1.25;
  letter-spacing: -.35px;
}

/* The welcome sentence in 千百问 is intentionally independent from the
   module title and remains a larger content-level introduction. */
.answer-prompt-area h1 {
  color: var(--db-type-primary);
  font-weight: var(--db-type-title-weight);
}

/* Creative Workbench aligns its private shell to the shared title bar. */
.workbench-home {
  padding: 15px 24px 72px;
}
.workbench-home-header {
  min-height: 49px;
  margin-bottom: 28px;
}
.workbench-board-section > h2 {
  color: var(--db-type-primary);
  font-size: var(--db-type-section-size);
  font-weight: var(--db-type-section-weight);
  line-height: 1.3;
  letter-spacing: -.35px;
}

/* Keyword categories are the measured baseline for compact horizontal menus:
   12px regular text, 1.2 line-height, no added tracking. */
.filter-popover-trigger,
.projects-views button,
.answer-book-section .answer-tools button,
.answer-book-section .answer-tools span {
  font-size: var(--db-type-menu-size);
  font-weight: var(--db-type-menu-weight);
  line-height: var(--db-type-menu-leading);
  letter-spacing: var(--db-type-menu-tracking);
}

/* Asset filters and keyword categories share one compact glass control row;
   the wrapper keeps dropdown anchoring local without changing filter state. */
body:not(.library-active) .asset-filter-menu-row {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, .58);
  border-radius: var(--db-radius-control);
  background: rgba(226, 232, 241, .42);
  box-shadow: inset 0 1px rgba(255, 255, 255, .56);
}

.filter-bar .asset-filter-menu-row .identity-filter-group {
  gap: 2px;
}

.filter-bar .asset-filter-menu-row .filter-popover-trigger,
.filter-bar .asset-filter-menu-row #assetColorSearchTrigger {
  min-height: 30px;
  border-radius: 9px;
  font-size: var(--db-type-menu-size);
  font-weight: var(--db-type-menu-weight);
  line-height: var(--db-type-menu-leading);
}

.filter-bar .asset-filter-menu-row .filter-popover-trigger:hover,
.filter-bar .asset-filter-menu-row .filter-popover.is-open .filter-popover-trigger,
.filter-bar .asset-filter-menu-row #assetColorSearchTrigger:hover,
.filter-bar .asset-filter-menu-row #assetColorSearchTrigger[aria-expanded="true"] {
  background: rgba(255, 255, 255, .43);
  color: #39465b;
}

.projects-views button {
  min-height: 30px;
  padding-inline: 12px;
}

/* Keyword categories are the shared horizontal-menu reference. The project
   view keeps its existing position and search behavior while using the same
   surface, control geometry and state language. */
.keyword-category-filter,
.projects-views {
  gap: 5px;
  padding: 4px;
  border: 1px solid rgba(210, 220, 234, .78);
  border-radius: 14px;
  background: #E9EEF7;
  box-shadow: none;
}
.keyword-category-filter {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
}
.keyword-category-filter button,
.projects-views button {
  flex: 0 0 auto;
  white-space: nowrap;
}
.keyword-category-filter button,
.projects-views button {
  min-height: 30px;
  padding: 0 12px;
  border-radius: 9px;
  color: var(--db-type-secondary);
  font-family: inherit;
  font-size: var(--db-type-menu-size);
  font-weight: var(--db-type-menu-weight);
  line-height: var(--db-type-menu-leading);
  letter-spacing: var(--db-type-menu-tracking);
}
.keyword-category-filter button:hover,
.projects-views button:hover,
.keyword-category-filter button:focus-visible,
.projects-views button:focus-visible {
  background: rgba(255, 255, 255, .43);
  color: #53647E;
}
.keyword-category-filter button.active,
.projects-views button.active {
  background: #fff;
  color: var(--db-type-primary);
  font-weight: 600;
  box-shadow: 0 2px 7px rgba(54, 72, 107, .07);
}

.answer-book-section .answer-tools {
  gap: 4px;
}

.answer-book-section .answer-tools button {
  min-height: 32px;
  padding-inline: 8px;
}

/* A single, quiet control language for module-local buttons. */
.projects-page .projects-primary,
.projects-page .projects-secondary,
.workbench-section .workbench-primary,
.answer-book-section .answer-tools button,
.answer-book-section .answer-composer-tool,
.answer-book-section .answer-send {
  min-height: 36px;
  border-radius: var(--db-radius-control);
  font-size: var(--db-type-control-size);
  font-weight: 620;
  line-height: 1;
  box-shadow: var(--db-glass-highlight), var(--db-shadow-control);
  transition: background var(--db-motion-fast) ease, border-color var(--db-motion-fast) ease, box-shadow var(--db-motion-fast) ease, transform var(--db-motion-fast) ease;
}
.projects-page .projects-primary,
.workbench-section .workbench-primary {
  border-color: rgba(123,157,214,.26);
  background: rgba(221,233,251,.78);
  color: #36578f;
}
.projects-page .projects-primary:hover,
.workbench-section .workbench-primary:hover {
  background: rgba(229,239,253,.95);
  box-shadow: var(--db-glass-highlight), 0 8px 20px rgba(70,99,151,.12);
}
.projects-page .projects-secondary,
.answer-book-section .answer-tools button,
.answer-book-section .answer-composer-tool {
  border: 1px solid var(--db-glass-edge);
  background: var(--db-glass-thin);
  color: var(--db-text-secondary);
}
.projects-page .projects-secondary:hover,
.answer-book-section .answer-tools button:hover,
.answer-book-section .answer-composer-tool:hover,
.answer-book-section .answer-composer-tool:focus-visible {
  background: rgba(255,255,255,.78);
  color: var(--db-text-primary);
}

/* Project page: the shared topbar owns the title; content begins with
   actions, then the view/search toolbar. */
.projects-page {
  padding-top: 10px;
  color: var(--db-type-primary);
}
.projects-page-header {
  min-height: 0;
  margin-bottom: 6px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  justify-content: flex-end;
}
.projects-header-actions { padding-top: 0; }
.projects-page-header > div:first-child,
.projects-page-header .projects-eyebrow,
.projects-page-header h1,
.projects-page-header p { display: none; }
.projects-connection-note { display: none; }
.projects-toolbar {
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
  padding: 4px;
  gap: 10px;
  border: 1px solid rgba(210, 220, 234, .78);
  border-radius: 14px;
  background: #E9EEF7;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.projects-views {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  overflow-x: auto;
}
.projects-search {
  flex: 0 1 280px;
  width: min(280px, 34%);
  min-width: 200px;
  height: 32px;
  box-sizing: border-box;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, .96);
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
}
.projects-search input {
  color: #53647E;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
}
.projects-search input::placeholder {
  color: #8A97AB;
  font-size: 13px;
  font-weight: 400;
}
.projects-empty { min-height: 238px; padding: 42px 20px 34px; }
.projects-empty h2 {
  color: var(--db-type-primary);
  font-size: var(--db-type-section-size);
  font-weight: var(--db-type-section-weight);
  line-height: 1.35;
}
.keyword-page .keyword-language-group > header h2 {
  margin: 0;
  color: var(--db-type-primary);
  font-size: var(--db-type-section-size);
  font-weight: var(--db-type-section-weight);
  line-height: 1.35;
  letter-spacing: -.2px;
}
.projects-empty p {
  max-width: 300px;
  margin-bottom: 17px;
  color: var(--db-type-secondary);
  font-size: var(--db-type-body-size);
  line-height: var(--db-type-body-leading);
}
.projects-empty .projects-secondary { display: none; }

/* Project mode keeps the shared title, but not the asset-library tools. The
   toolbar returns automatically when configureSection removes this class. */
.app-shell.projects-section .topbar .toolbar { display: none; }

@media (max-width: 900px) {
  .projects-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
  .projects-search {
    order: -1;
    width: 100%;
    min-width: 0;
  }
  .projects-views { width: 100%; }
}

/* Inbox secondary headings use the same hierarchy without changing its
   two-column review layout or action events. */
.inbox-section .inbox-aesthetic-panel h2,
.inbox-section .visual-type-head > span,
.inbox-section .professional-traits-heading {
  color: var(--db-type-primary);
  font-size: var(--db-type-section-size);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.15px;
}
.inbox-section .signal-heading {
  color: var(--db-type-primary);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}

.inbox-section .inbox-judgment-note > span {
  color: var(--db-type-primary);
  font-size: var(--db-type-section-size);
  font-weight: var(--db-type-section-weight);
  line-height: 1.3;
}

.inbox-section .inbox-judgment-note > span small {
  color: var(--db-type-tertiary);
  font-size: var(--db-type-meta-size);
  font-weight: 400;
  letter-spacing: 0;
}

.inbox-unified-card .trait-dimension {
  color: var(--db-type-secondary);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
}

.inbox-unified-card .aesthetic-axis button {
  color: var(--db-type-secondary);
  font-size: 13px;
  font-weight: 500;
  line-height: var(--db-type-menu-leading);
  letter-spacing: var(--db-type-menu-tracking);
}

.inbox-unified-card .aesthetic-signal-groups {
  gap: 14px;
  margin-top: 28px;
}

.inbox-unified-card .aesthetic-signal-group .signal-group-head {
  min-height: 25px;
  margin-bottom: 2px;
}

.inbox-unified-card .aesthetic-signal-list:empty {
  display: none;
}

.inbox-unified-card .aesthetic-axes {
  grid-template-columns: 1fr !important;
  gap: 12px;
  margin-top: 18px;
}

.inbox-unified-card .aesthetic-axis > span {
  margin-bottom: 5px;
  color: #68778F;
  font-size: 13px;
  font-weight: 500;
}

.inbox-section .inbox-aesthetic-panel { padding-top: 28px; }
.inbox-section .asset-identity-field { gap: 18px; }
.inbox-section .asset-identity-editor { gap: 12px; }
.inbox-section .professional-traits-heading { margin: 28px 0 0; }
.inbox-section .inbox-judgment-note {
  display: grid;
  gap: 18px;
  margin-top: 28px;
  padding-top: 0;
  border-top: 0;
}
.inbox-section .identity-editor-row-trigger {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
}
.inbox-section .identity-editor-row-trigger > span:first-child {
  color: #68778F;
  font-size: 13px;
  font-weight: 500;
}
.inbox-section .identity-editor-row-value {
  color: #53647E;
  font-size: 13px;
  font-weight: 500;
}
.inbox-section .identity-editor-row-value small,
.inbox-section .inbox-judgment-note > span small {
  color: #8A97AB;
  font-size: 12px;
  font-weight: 400;
}
.inbox-section .identity-editor-popover button,
.inbox-section .trait-value {
  font-size: 13px;
  line-height: 1.3;
}
.inbox-section .identity-editor-popover button {
  font-weight: 500;
  color: #53647E;
}
.inbox-section .identity-editor-popover button.active,
.inbox-section .identity-editor-popover button[aria-pressed="true"],
.inbox-section .trait-value.active,
.inbox-section .trait-value[aria-pressed="true"] {
  color: var(--db-type-primary);
  font-weight: 600;
}
.inbox-section .aesthetic-axis[data-trait-row] { gap: 16px; }
.inbox-section .aesthetic-axis button,
.inbox-section .aesthetic-axis button.active {
  font-size: 13px;
  line-height: 1.3;
}

/* Signal pickers stay local to the review panel. A bounded surface prevents a
   long vocabulary from pushing professional traits and the fixed actions out
   of view; the temporary selection state remains owned by app-v02.js. */
.inbox-unified-card .aesthetic-picker,
.inbox-unified-card .unified-picker {
  box-sizing: border-box;
  max-height: min(260px, 32vh);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  margin-top: 7px;
  padding: 8px;
  border: 1px solid rgba(91, 112, 149, .10);
  border-radius: 12px;
  background: rgba(247, 250, 254, .88);
  box-shadow: inset 0 1px rgba(255, 255, 255, .72);
}
.inbox-unified-card .aesthetic-picker::-webkit-scrollbar,
.inbox-unified-card .unified-picker::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
.inbox-unified-card .aesthetic-picker::-webkit-scrollbar-thumb,
.inbox-unified-card .unified-picker::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(104, 123, 153, .28);
}

/* C09: visual type is the same menu component as asset type, with a single
   option column. Keep the identity order and data contract in app-v02.js. */
.inbox-unified-card .identity-domain-popover,
.inbox-unified-card .identity-type-popover {
  box-sizing: border-box;
  padding: 9px 10px;
  border: 1px solid rgba(105, 122, 147, .12);
  border-radius: 12px;
  background: rgba(252, 253, 255, .94);
  box-shadow: 0 8px 24px rgba(37, 53, 76, .08);
}
.inbox-unified-card .identity-domain-options,
.inbox-unified-card .visual-subtype-options {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  padding: 0 0 4px;
}
.inbox-unified-card .identity-domain-options button,
.inbox-unified-card .visual-subtype-options button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 29px;
  padding: 5px 8px;
  border: 0;
  border-radius: 8px;
  color: #6f7d90;
  background: transparent;
  font: inherit;
  font-size: 10px;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
}
.inbox-unified-card .identity-domain-options button:hover,
.inbox-unified-card .visual-subtype-options button:hover,
.inbox-unified-card .identity-domain-options button.active,
.inbox-unified-card .visual-subtype-options button.active {
  color: #526783;
  background: rgba(218, 228, 243, .72);
}
.inbox-unified-card .identity-domain-options button.active::after,
.inbox-unified-card .visual-subtype-options button.active::after {
  content: "✓";
  color: #7b8ca5;
}

/* C09: LIKE and DISLIKE share one compact two-column vocabulary picker. */
.inbox-unified-card .aesthetic-picker .shared-vocabulary-panel {
  display: grid;
  grid-template-columns: minmax(112px, .78fr) minmax(170px, 1.22fr);
  align-items: start;
  gap: 8px;
  margin-top: 8px;
}
.inbox-unified-card .aesthetic-picker .shared-vocabulary-category-tabs {
  display: grid;
  grid-column: 1;
  gap: 1px;
}
.inbox-unified-card .aesthetic-picker .shared-vocabulary-category-tabs button {
  min-height: 27px;
  padding: 5px 8px;
  border: 0;
  border-radius: 8px;
  color: #68778f;
  background: transparent;
  font: inherit;
  font-size: 10px;
  line-height: 1.25;
  text-align: left;
}
.inbox-unified-card .aesthetic-picker .shared-vocabulary-category-tabs button:hover,
.inbox-unified-card .aesthetic-picker .shared-vocabulary-category-tabs button.active {
  color: #526783;
  background: rgba(218, 228, 243, .72);
}
.inbox-unified-card .aesthetic-picker .shared-vocabulary-results {
  grid-column: 2;
  min-width: 0;
  min-height: 29px;
  padding-left: 8px;
  border-left: 1px solid rgba(105, 122, 147, .11);
}
.inbox-unified-card .aesthetic-picker .shared-vocabulary-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
}
.inbox-unified-card .aesthetic-picker .shared-vocabulary-options button {
  min-width: 0;
  min-height: 27px;
  padding: 5px 7px;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  color: #68778f;
  background: rgba(239, 243, 249, .72);
  font: inherit;
  font-size: 10px;
  line-height: 1.25;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inbox-unified-card .aesthetic-picker .shared-vocabulary-options button:hover,
.inbox-unified-card .aesthetic-picker .shared-vocabulary-options button.selected {
  color: #526783;
  background: rgba(218, 228, 243, .72);
}
.inbox-unified-card .aesthetic-picker .picker-empty {
  display: block;
  padding: 5px 2px;
  color: #8a96a4;
  font-size: 10px;
  line-height: 1.35;
}

/* Review judgment: semantic colors remain visible but move to the same quiet glass language. */
.inbox-section .inbox-queue-actions .queue-keep {
  border-color: rgba(52,158,121,.18);
  background: rgba(230,247,239,.82);
  color: #2f9474;
}
.inbox-section .inbox-queue-actions .queue-discard {
  border-color: rgba(216,95,107,.18);
  background: rgba(253,237,240,.82);
  color: #d35f6c;
}
.inbox-section .inbox-queue-actions .queue-later {
  border-color: rgba(106,123,149,.16);
  background: rgba(239,243,249,.82);
  color: #687b97;
}
.inbox-section .inbox-queue-actions button:hover,
.inbox-section .inbox-queue-actions button:focus-visible {
  background: rgba(255,255,255,.92);
  box-shadow: var(--db-glass-highlight), 0 10px 25px rgba(46,61,91,.12);
}
.inbox-unified-card .aesthetic-axis > div {
  border: 1px solid rgba(91,112,149,.08);
  background: rgba(232,237,247,.64);
  box-shadow: inset 0 1px rgba(255,255,255,.66);
}
.inbox-unified-card .aesthetic-axis button {
  border-radius: 9px;
  color: var(--db-text-tertiary);
}
.inbox-unified-card .aesthetic-axis button.active {
  border: 1px solid rgba(91,122,186,.13);
  background: rgba(255,255,255,.82);
  color: var(--db-text-primary);
  box-shadow: var(--db-glass-highlight), 0 3px 9px rgba(42,55,81,.08);
}
.inbox-section .aesthetic-signal-group.like .signal-heading,
.inbox-section .aesthetic-signal-group.like .signal-heading-icon { color: #2f9474; }
.inbox-section .aesthetic-signal-group.dislike .signal-heading,
.inbox-section .aesthetic-signal-group.dislike .signal-heading-icon { color: #d35f6c; }

/* Keyboard visibility and compact-width protection across the touched modules. */
.projects-page button:focus-visible,
.workbench-section button:focus-visible,
.answer-book-section button:focus-visible,
.inbox-section button:focus-visible {
  outline: 3px solid rgba(91,122,186,.22);
  outline-offset: 2px;
}
@media (max-width: 720px) {
  .projects-page h1,
  .workbench-home-header h1 { font-size: 23px; }
  .answer-book-header .answer-module-title { font-size: 23px; }
  .answer-book-header .answer-conversation-title { font-size: 17px; }
  .workbench-home { padding-inline: 18px; }
  .projects-page { padding-inline: 20px; }
}

/* FINAL-MICRO-FIX-10: one text system for the visual and asset type menus.
   The existing menu geometry remains unchanged; only typography and states
   are normalized. Current sizes were 10px (visual options) and 13px (asset
   options); the shared middle token is 12px. */
.inbox-section {
  --db-identity-menu-font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", sans-serif;
  --db-identity-menu-font-size: 12px;
  --db-identity-menu-font-weight: 500;
  --db-identity-menu-line-height: 1.3;
  --db-identity-menu-color: #53647e;
  --db-identity-menu-hover-color: #526783;
  --db-identity-menu-selected-color: var(--db-type-primary);
  --db-identity-menu-hover-background: rgba(105, 126, 158, .055);
  --db-identity-menu-selected-background: rgba(218, 228, 243, .72);
}
.inbox-section .identity-domain-options button,
.inbox-section .visual-subtype-options button,
.inbox-section .identity-type-family-list button,
.inbox-section .identity-type-options button {
  font-family: var(--db-identity-menu-font-family);
  font-size: var(--db-identity-menu-font-size);
  font-weight: var(--db-identity-menu-font-weight);
  line-height: var(--db-identity-menu-line-height);
  color: var(--db-identity-menu-color);
}
.inbox-section .identity-domain-options button:hover,
.inbox-section .visual-subtype-options button:hover,
.inbox-section .identity-type-family-list button:hover,
.inbox-section .identity-type-options button:hover {
  color: var(--db-identity-menu-hover-color);
  background: var(--db-identity-menu-hover-background);
}
.inbox-section .identity-domain-options button.active,
.inbox-section .visual-subtype-options button.active,
.inbox-section .identity-type-family-list button.active,
.inbox-section .identity-type-options button.active,
.inbox-section .identity-domain-options button[aria-pressed="true"],
.inbox-section .visual-subtype-options button[aria-pressed="true"],
.inbox-section .identity-type-family-list button[aria-pressed="true"],
.inbox-section .identity-type-options button[aria-pressed="true"] {
  color: var(--db-identity-menu-selected-color);
  background: var(--db-identity-menu-selected-background);
}
.inbox-section .identity-domain-options button.active:hover,
.inbox-section .visual-subtype-options button.active:hover,
.inbox-section .identity-type-family-list button.active:hover,
.inbox-section .identity-type-options button.active:hover,
.inbox-section .identity-domain-options button[aria-pressed="true"]:hover,
.inbox-section .visual-subtype-options button[aria-pressed="true"]:hover,
.inbox-section .identity-type-family-list button[aria-pressed="true"]:hover,
.inbox-section .identity-type-options button[aria-pressed="true"]:hover {
  color: var(--db-identity-menu-selected-color);
  background: var(--db-identity-menu-selected-background);
}
