@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600&display=swap');

/* Final typography + dense-data UX normalization for LS-LIEN-035 POC. */
:root {
  --font-ui: 'Be Vietnam Pro', 'Segoe UI', Arial, sans-serif;
  --type-meta: 12px;
  --type-caption: 13px;
  --type-body: 14px;
  --type-body-lg: 15px;
  --type-section: 18px;
  --type-title: 22px;
  --type-display: 28px;
}

html,
body,
button,
input,
textarea,
select,
[contenteditable='true'] {
  font-family: var(--font-ui) !important;
}

body {
  font-size: var(--type-body) !important;
  line-height: 1.6;
  font-weight: 400;
}

small,
.demo-chat-worker-head > span,
.workspace-directory em,
.task-calendar-weekdays span,
.task-calendar-day b,
.kanban-column > header b,
.notion-task-table-head,
.task-status {
  font-size: var(--type-meta) !important;
}

.workspace-copy strong,
.module-item,
.global-thread-row strong,
.global-note-row strong,
.conversation-mini b,
.conversation-mini em,
.demo-vibe-thread-list strong,
.demo-vibe-thread-list b,
.calendar-task strong,
.kanban-column > header strong,
.notion-task-row strong,
.notion-properties span,
.notion-properties button,
.property-control {
  font-size: var(--type-caption) !important;
}

.page-header p,
.conversation-header p,
.note-body-copy,
.block-editable,
.chat-body,
.composer-box textarea,
.demo-chat-worker p,
.notion-relations p,
.notion-relations button,
.knowledge-row,
.notion-task-row > span:not(:first-child) {
  font-size: var(--type-body) !important;
}

.notion-editor-shell .block-editable {
  font-size: var(--type-body-lg) !important;
  line-height: 1.72 !important;
}

.notion-heading .block-editable {
  font-size: 19px !important;
  line-height: 1.42 !important;
  font-weight: 600;
}

.notion-code .block-editable {
  font-size: 13px !important;
}

.page-header h1,
.note-detail h1,
.device-detail h1,
.my-task-header h1,
.quick-note-header h1,
.notion-page-title {
  font-size: var(--type-display) !important;
  line-height: 1.2 !important;
  letter-spacing: -.02em !important;
}

.conversation-header h1 {
  font-size: var(--type-title) !important;
  line-height: 1.25 !important;
}

.eyebrow,
.module-group-label,
.global-sidebar-section-label,
.notion-section-label,
.note-meta,
.focus-label {
  font-size: var(--type-meta) !important;
  letter-spacing: .045em !important;
}

/* Conversation execution states: running = blinking amber, done = steady green. */
.conversation-state-dot {
  width: 9px !important;
  height: 9px !important;
  min-width: 9px !important;
  border-radius: 999px !important;
  background: #a7a39a !important;
  box-shadow: none !important;
}

.conversation-state-dot.running {
  background: #d79a2b !important;
  animation: density-conversation-running 1.15s ease-in-out infinite !important;
}

.conversation-state-dot.done {
  background: #2f7d5b !important;
  animation: none !important;
}

.conversation-state-dot.waiting {
  background: #d79a2b !important;
  animation: none !important;
}

.conversation-state-dot.idle {
  background: #aaa69e !important;
  animation: none !important;
}

@keyframes density-conversation-running {
  0%, 100% { opacity: .38; box-shadow: 0 0 0 0 rgba(215, 154, 43, .08); }
  50% { opacity: 1; box-shadow: 0 0 0 6px rgba(215, 154, 43, .12); }
}

.conversation-mini-list.dense {
  max-height: 430px;
}

.conversation-mini {
  min-height: 38px;
}

.conversation-execution-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  margin-top: 7px;
  padding: 4px 8px;
  border: 1px solid var(--border, #dedbd3);
  border-radius: 999px;
  color: var(--muted, #77746d);
  font-size: 12px;
  font-weight: 500;
}

.conversation-execution-chip i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #aaa69e;
}

.conversation-execution-chip.running i {
  background: #d79a2b;
  animation: density-conversation-running 1.15s ease-in-out infinite;
}

.conversation-execution-chip.done i { background: #2f7d5b; }
.conversation-execution-chip.waiting i { background: #d79a2b; }

/* Year-end Calendar controls. */
.task-calendar-toolbar button:disabled {
  opacity: .3;
  cursor: default;
}

.task-calendar-toolbar > div {
  display: flex;
  align-items: center;
  gap: 6px;
}

.task-calendar-toolbar strong {
  margin-left: 5px;
  min-width: 124px;
}

.calendar-task {
  min-height: 34px;
}

.calendar-task strong {
  font-size: 13px !important;
  line-height: 1.35;
}

.calendar-task small {
  font-size: 12px !important;
  line-height: 1.35;
}

/* Long-note reading modes and page turning. */
.demo-note-pagebar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 18px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border, #dedbd3);
  background: var(--surface, #fff);
}

.demo-reader-modes,
.demo-page-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.demo-reader-modes button,
.demo-page-controls button,
.demo-note-pagefooter button {
  min-height: 32px;
  padding: 5px 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.demo-reader-modes button:hover,
.demo-page-controls button:hover:not(:disabled),
.demo-note-pagefooter button:hover:not(:disabled) {
  background: var(--surface-2, #f2f0ea);
}

.demo-reader-modes button.active {
  border-color: var(--border, #dedbd3);
  background: var(--surface-2, #f2f0ea);
}

.demo-page-controls span,
.demo-note-pagefooter span {
  min-width: 92px;
  text-align: center;
  color: var(--muted, #77746d);
  font-size: 12px;
}

.demo-page-controls button:disabled,
.demo-note-pagefooter button:disabled {
  opacity: .28;
  cursor: default;
}

.demo-page-controls.is-continuous button {
  display: none;
}

.demo-paged-reader .notion-blocks {
  min-height: 460px;
}

.demo-paged-reader .notion-block[hidden] {
  display: none !important;
}

.demo-note-pagefooter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 2px;
  padding-top: 12px;
  border-top: 1px solid var(--border, #dedbd3);
}

.demo-page-turn-next {
  animation: density-page-next .24s ease-out;
}

.demo-page-turn-prev {
  animation: density-page-prev .24s ease-out;
}

@keyframes density-page-next {
  from { opacity: .35; transform: translateX(10px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes density-page-prev {
  from { opacity: .35; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 760px) {
  :root {
    --type-display: 24px;
    --type-title: 20px;
  }

  .demo-note-pagebar {
    position: static;
    align-items: stretch;
    flex-direction: column;
  }

  .demo-reader-modes,
  .demo-page-controls {
    width: 100%;
  }

  .demo-reader-modes button {
    flex: 1;
  }

  .demo-page-controls {
    justify-content: space-between;
  }

  .demo-paged-reader .notion-blocks {
    min-height: 0;
  }

  .demo-note-pagefooter {
    gap: 5px;
  }

  .demo-note-pagefooter button {
    padding-inline: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .conversation-state-dot.running,
  .conversation-execution-chip.running i,
  .demo-page-turn-next,
  .demo-page-turn-prev {
    animation: none !important;
  }
}
