.briefing-page {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 8px 16px 64px;
}
.briefing-page .page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
}
.briefing-page h1 {
  margin: 0;
  font-size: 1.5rem;
  flex: 0 0 auto;
}
.briefing-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.briefing-header-actions [hidden] {
  display: none !important;
}
.briefing-index-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 12px;
}
.briefing-search {
  flex: 1 1 240px;
  min-width: 160px;
  max-width: none;
}
/* L3 badges — same composition as Town Hall .crm-tabs; visual tab rules stay in hea_app.css */
.briefing-tabs {
  margin-bottom: 8px;
  overflow-x: auto;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.briefing-tabs .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--line);
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  margin-left: 6px;
  line-height: 1;
}
.briefing-tabs .inner-tab.active .badge {
  background: color-mix(in oklab, var(--brand1) 15%, var(--surface));
  color: var(--brand1);
}
.briefing-search input[type="search"] {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 38px;
  font: inherit;
  font-size: 0.95rem;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface, var(--bg));
  color: var(--ink);
}
.briefing-search input[type="search"]:focus {
  outline: none;
  border-color: var(--brand, #ff6a3d);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand, #ff6a3d) 25%, transparent);
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.briefing-lede {
  color: var(--muted);
  margin: 0 0 16px;
  max-width: 72ch;
}
.briefing-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.briefing-count {
  color: var(--muted);
  font-size: 0.88rem;
}
.briefing-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.briefing-chip {
  border: 1px solid var(--line);
  background: var(--surface, var(--bg));
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 10px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.briefing-chip[aria-pressed="true"] {
  border-color: var(--brand, #ff6a3d);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand, #ff6a3d) 25%, transparent);
}
.briefing-index {
  columns: 2 340px;
  column-gap: 28px;
  margin-top: 14px;
}
.briefing-index .ub-section {
  break-inside: avoid;
  margin: 0 0 20px;
}
.briefing-index .ub-section-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 6px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--line);
  font-size: 1rem;
  font-weight: 700;
}
.briefing-index .ub-count {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}
.briefing-index .ub-links {
  list-style: none;
  margin: 0;
  padding: 0;
}
.briefing-index .ub-links li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
}
.briefing-index .ub-links li[data-status="deleted"] {
  opacity: 0.65;
}
.briefing-index .ub-open {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.briefing-index .ub-open:hover {
  background: var(--surface-2, color-mix(in srgb, var(--ink) 5%, var(--surface, var(--bg))));
  border-color: var(--line);
}
.briefing-index .ub-link-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--brand, #ff7a5c);
}
.briefing-index .ub-kind-ico {
  width: 0.95em;
  height: 0.95em;
  flex-shrink: 0;
  color: currentColor;
}
.briefing-index .ub-link-desc {
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--muted);
}
.briefing-index .ub-meta {
  font-size: 0.72rem;
  color: var(--muted);
}
.briefing-index .ub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding-top: 6px;
}
.briefing-index .ub-actions a,
.briefing-index .ub-actions button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 4px;
  cursor: pointer;
  text-decoration: none;
}
.briefing-index .ub-actions a:hover,
.briefing-index .ub-actions button:hover {
  color: var(--ink);
}
.briefing-index .ub-actions .ub-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
}
.briefing-index .ub-actions .ub-icon svg {
  width: 14px;
  height: 14px;
}
.briefing-index .ub-actions button.danger:hover {
  color: #b42318;
}
html.dark .briefing-index .ub-actions button.danger:hover,
body.dark .briefing-index .ub-actions button.danger:hover {
  color: #fca5a5;
}
.briefing-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}
.briefing-card-actions [hidden] {
  display: none !important;
}
.briefing-empty,
.briefing-blocked {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 28px 18px;
  color: var(--muted);
  text-align: center;
}
.briefing-log {
  margin-top: 4px;
}
.briefing-log .briefing-empty {
  margin: 0;
}
.briefing-log table[hidden] {
  display: none !important;
}
.briefing-log table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.briefing-log th,
.briefing-log td {
  text-align: left;
  padding: 5px 6px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.briefing-log-item {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.briefing-log-pill {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
}
.briefing-log-pill:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 5%, var(--surface, var(--bg)));
}
html.dark .briefing-log-pill:hover,
body.dark .briefing-log-pill:hover {
  background: color-mix(in srgb, var(--ink) 8%, var(--surface, var(--bg)));
}
.briefing-modal[hidden],
.briefing-drawer[hidden] {
  display: none !important;
}
.briefing-modal {
  position: fixed;
  inset: 0;
  background: color-mix(in srgb, #0b1022 45%, transparent);
  display: grid;
  place-items: center;
  z-index: 40;
  padding: 16px;
}
.briefing-modal-card,
.briefing-drawer-card {
  justify-self: center;
  align-self: center;
  width: min(560px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: var(--surface, var(--bg));
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow-md, 0 6px 14px rgba(0,0,0,.10));
}
.briefing-drawer-card {
  width: min(460px, 100%);
  padding: 20px 22px 22px;
}
.briefing-drawer-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.briefing-drawer-head h2 {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.briefing-drawer-close {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: -4px -6px 0 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.briefing-drawer-close:hover,
.briefing-drawer-close:focus-visible {
  color: var(--ink);
  background: color-mix(in srgb, var(--surface-2, #f1f5f9) 88%, transparent);
  border-color: var(--line);
}
.briefing-drawer-close:focus-visible {
  outline: 2px solid var(--brand1, #ff6a3d);
  outline-offset: 2px;
}
.briefing-drawer-close .hei {
  width: 16px;
  height: 16px;
}
.briefing-drawer-meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}
.briefing-drawer-body {
  margin: 14px 0 0;
}
.briefing-drawer-body:empty {
  display: none;
}
.briefing-drawer-desc,
.briefing-drawer-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}
.briefing-drawer-link {
  margin: 0;
  word-break: break-all;
}
.briefing-drawer-card .briefing-card-actions {
  margin: 16px 0 0;
}
.briefing-versions-wrap {
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.briefing-versions-wrap h3 {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.briefing-versions {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.briefing-version-top {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.briefing-version-id {
  font-weight: 700;
  font-size: 0.9rem;
}
.briefing-version-chip {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand, #ff6a3d) 12%, var(--surface, var(--bg)));
  color: var(--brand, #ff6a3d);
}
.briefing-version-when {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.briefing-version-reason {
  margin: 3px 0 0;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--ink);
}
.briefing-version:not(.is-current) .briefing-version-id,
.briefing-version:not(.is-current) .briefing-version-reason {
  color: var(--muted);
}
.briefing-version-empty {
  color: var(--muted);
  font-size: 0.86rem;
}
.briefing-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}
.briefing-field[hidden] {
  display: none !important;
}
.briefing-field label {
  font-size: 0.85rem;
  font-weight: 600;
}
.briefing-section-combo {
  position: relative;
}
.briefing-section-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 5;
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface, var(--bg));
  box-shadow: 0 8px 24px color-mix(in srgb, var(--ink) 12%, transparent);
}
.briefing-section-option {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 8px 10px;
  cursor: pointer;
}
.briefing-section-option:hover,
.briefing-section-option:focus {
  background: var(--surface-2, color-mix(in srgb, var(--ink) 6%, var(--surface, var(--bg))));
}
.briefing-field input,
.briefing-field select,
.briefing-field textarea {
  font: inherit;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
}
.briefing-kind-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.briefing-kind-tabs[hidden] {
  display: none;
}
.briefing-kind-tabs .briefing-chip[aria-pressed="true"] {
  border-color: var(--brand, #ff6a3d);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand, #ff6a3d) 25%, transparent);
}
.briefing-error {
  color: #b42318;
  font-size: 0.9rem;
}
html.dark .briefing-error,
body.dark .briefing-error {
  color: #fca5a5;
}
.briefing-note {
  font-size: 0.95rem;
}
.briefing-note h1,
.briefing-note h2,
.briefing-note h3,
.briefing-note h4,
.bv-doc h1,
.bv-doc h2,
.bv-doc h3,
.bv-doc h4 {
  margin: 1.1em 0 0.4em;
  line-height: 1.25;
}
.briefing-note h1, .bv-doc h1 { font-size: 1.45rem; }
.briefing-note h2, .bv-doc h2 { font-size: 1.2rem; }
.briefing-note h3, .bv-doc h3 { font-size: 1.05rem; }
.briefing-note p, .bv-doc p { margin: 0 0 0.7em; }
.briefing-note ul, .bv-doc ul { margin: 0 0 0.8em; padding-left: 1.2em; }
.briefing-note li, .bv-doc li { margin: 0.15em 0; }
.bv-bar {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface, var(--bg));
  position: sticky;
  top: 0;
  z-index: 2;
}
.bv-back {
  flex: 0 0 auto;
  margin-top: 6px;
  color: var(--brand, #ff7a5c);
  font-weight: 600;
  text-decoration: none;
}
.bv-heading { flex: 1 1 auto; min-width: 0; }
.bv-heading h1 {
  margin: 0;
  font-size: 1.2rem;
}
.bv-lede {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}
.bv-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}
.bv-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
}
.bv-icon svg {
  width: 16px;
  height: 16px;
}
.bv-tools [hidden],
.bv-savebar[hidden],
.bv-editor[hidden] {
  display: none !important;
}
body.bv-chat .bv-tools,
body.bv-chat .bv-savebar,
body.bv-chat .bv-editor {
  display: none !important;
}
.bv-savebar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 8px 20px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface, var(--bg));
}
.bv-savebar input {
  flex: 1 1 220px;
  min-width: 160px;
  font: inherit;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
}
main.bv-main,
.bv-main {
  flex: 1 1 auto;
  width: min(880px, 100%);
  margin: 0 auto;
  padding: 20px 20px 64px;
  text-align: left;
}
.bv-main.bv-main--code {
  width: min(1100px, 100%);
}
.bv-doc,
.bv-json,
.bv-text,
.bv-editor {
  text-align: left;
}
.bv-doc {
  font-size: 1.02rem;
  line-height: 1.55;
}
.bv-editor {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: calc(100vh - 160px);
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2, color-mix(in srgb, var(--ink) 4%, var(--surface, var(--bg))));
  color: var(--ink);
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  resize: vertical;
}
.bv-table-wrap { overflow-x: auto; margin: 0 0 1em; }
.bv-table,
.briefing-note .bv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.bv-table th,
.bv-table td,
.briefing-note .bv-table th,
.briefing-note .bv-table td {
  border: 1px solid var(--line);
  padding: 6px 8px;
  vertical-align: top;
}
.bv-table th,
.briefing-note .bv-table th {
  background: var(--surface-2, color-mix(in srgb, var(--ink) 5%, var(--surface, var(--bg))));
}
.bv-json,
.bv-text,
.bv-code,
.briefing-note .bv-code {
  overflow: auto;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-2, color-mix(in srgb, var(--ink) 5%, var(--surface, var(--bg))));
  font-size: 0.84rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.bv-image,
.bv-video {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: min(70vh, 560px);
  margin: 0 auto;
  object-fit: contain;
  object-position: center;
  border-radius: 10px;
  border: 1px solid var(--line);
}
.bv-video {
  width: 100%;
  background: #111;
}
.bv-main.bv-main--chat {
  width: min(720px, 100%);
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding-bottom: 20px;
}
body.bv-chat #bvPreviewPane {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}
.bv-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
  padding-top: 10px;
}
body.bv-chat .bv-thread {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
.bv-main,
.bv-main--chat,
.bv-thread,
.bv-msg,
.bv-msg-card,
.bv-msg-body,
.bv-chat-editor,
.bv-lede {
  text-align: left;
}
.bv-msg {
  padding: 0;
  border: 0;
  background: transparent;
}
.bv-msg-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.bv-msg-stack {
  position: relative;
  min-width: 0;
  flex: 1 1 auto;
}
.bv-face {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
  color: rgba(248, 250, 252, 0.94);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.05) 36%, rgba(8, 10, 14, 0.38) 100%),
    linear-gradient(145deg, #414856 0%, #171b22 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.28) inset,
    0 -1px 0 rgba(0, 0, 0, 0.45) inset,
    0 6px 14px rgba(0, 0, 0, 0.22),
    0 1px 2px rgba(0, 0, 0, 0.16);
  user-select: none;
}
.bv-face img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.bv-msg-card {
  width: fit-content;
  max-width: min(100%, 52rem);
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface, var(--bg));
}
.bv-msg-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 0.75rem;
  color: var(--muted);
}
.bv-msg-body {
  font-size: 0.95rem;
  line-height: 1.5;
}
.bv-msg-body p { margin: 0 0 0.6em; }
.bv-msg-body p:last-child { margin-bottom: 0; }
.bv-msg-body h1,
.bv-msg-body h2,
.bv-msg-body h3,
.bv-msg-body h4 {
  margin: 0 0 0.45em;
  text-align: left;
  font-size: 1em;
}
.bv-msg-body ul,
.bv-msg-body ol {
  margin: 0.35em 0 0.6em;
  padding-left: 1.3em;
}
.bv-msg-body blockquote {
  margin: 0.4em 0;
  padding: 0.15em 0 0.15em 0.8em;
  border-left: 3px solid var(--line);
  color: var(--muted);
}
.bv-msg-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: color-mix(in srgb, var(--ink) 6%, var(--surface, var(--bg)));
}
.bv-composer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.bv-composer-box {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface, var(--bg));
  overflow: hidden;
}
.bv-fmt {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  padding: 4px 6px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--ink) 3%, var(--surface, var(--bg)));
}
.bv-fmt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.bv-fmt-btn:hover,
.bv-fmt-btn:focus-visible {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 8%, var(--surface, var(--bg)));
}
.bv-fmt-btn svg {
  display: block;
  width: 16px;
  height: 16px;
}
.bv-composer label.visually-hidden {
  font-weight: inherit;
  margin: 0;
}
.bv-chat-editor {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 88px;
  box-sizing: border-box;
  padding: 10px 12px;
  outline: none;
  color: var(--ink);
  font: inherit;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.bv-chat-editor.is-empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
  pointer-events: none;
}
.bv-chat-editor a { color: var(--brand, #ff7a5c); }
.bv-composer textarea[hidden] {
  display: none !important;
}
.bv-main--chat .bv-composer textarea:not([hidden]),
.bv-composer textarea:not([hidden]) {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: auto;
  min-height: 88px;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2, color-mix(in srgb, var(--ink) 4%, var(--surface, var(--bg))));
  color: var(--ink);
  font: inherit;
  resize: vertical;
  text-align: left;
}
.bv-composer-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 8px;
}
.bv-composer.is-drop {
  outline: 2px dashed var(--brand, #ff7a5c);
  outline-offset: 4px;
  border-radius: 10px;
}
.bv-pending {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.bv-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2, color-mix(in srgb, var(--ink) 5%, var(--surface, var(--bg))));
  font-size: 0.8rem;
}
.bv-chip button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  line-height: 1;
}
.bv-attach-btn {
  cursor: pointer;
  display: inline-flex;
  margin-top: 0;
  font-weight: inherit;
}
.bv-atts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.bv-att {
  position: relative;
  display: block;
}
.bv-att--media {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-width: 0;
  background: color-mix(in srgb, var(--ink) 4%, var(--surface, var(--bg)));
  border-radius: 10px;
  overflow: hidden;
}
.bv-att-rm {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 1;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface, var(--bg)) 88%, var(--ink) 12%);
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}
.bv-att-rm:hover {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--destructive, #d7263d) 40%, var(--line));
}
.bv-att-image,
.bv-att-video {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: min(70vh, 520px);
  margin: 0 auto;
  object-fit: contain;
  object-position: center;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.bv-att-video {
  width: 100%;
  background: #111;
}
.bv-att-link,
.bv-att-file {
  color: var(--brand, #ff7a5c);
  word-break: break-all;
}
.bv-msg-hover {
  position: absolute;
  top: -14px;
  right: 6px;
  z-index: 2;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface, var(--bg));
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  opacity: 0;
  pointer-events: none;
}
.bv-msg:hover .bv-msg-hover,
.bv-msg:focus-within .bv-msg-hover {
  opacity: 1;
  pointer-events: auto;
}
.bv-thread > .bv-msg:first-child .bv-msg-hover {
  top: 4px;
}
.bv-msg-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-top: 10px;
  padding: 2px 2px 0;
}
.bv-reacts,
.bv-msg-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: 0;
}
.bv-reacts--got {
  margin-top: 6px;
}
@media (hover: none) {
  .bv-msg-hover {
    position: static;
    top: auto;
    right: auto;
    margin-top: 8px;
    opacity: 1;
    pointer-events: auto;
    box-shadow: none;
  }
}
.bv-react {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 26px;
  min-width: 26px;
  padding: 0 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  font: inherit;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}
.bv-react-ico {
  display: inline-flex;
  width: 14px;
  height: 14px;
  opacity: 0.82;
}
.bv-react-ico svg,
.bv-msg-tool svg {
  display: block;
  width: 14px;
  height: 14px;
}
.bv-react:hover {
  border-color: var(--line);
  background: color-mix(in srgb, var(--ink) 5%, var(--surface, var(--bg)));
}
.bv-react:hover .bv-react-ico,
.bv-react.is-on .bv-react-ico {
  opacity: 1;
  filter: none;
}
.bv-react.is-on {
  border-color: color-mix(in srgb, var(--brand, #ff7a5c) 40%, var(--line));
  background: color-mix(in srgb, var(--brand, #ff7a5c) 10%, var(--surface, var(--bg)));
  color: var(--ink);
}
.bv-react-n {
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.bv-msg-tool {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  min-width: 26px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: none;
}
.bv-msg-tool:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 5%, var(--surface, var(--bg)));
}
.bv-msg-tool--primary {
  border-color: color-mix(in srgb, var(--brand, #ff7a5c) 45%, var(--line));
  color: var(--brand, #ff7a5c);
}
.bv-msg-tool--primary:hover {
  background: color-mix(in srgb, var(--brand, #ff7a5c) 10%, var(--surface, var(--bg)));
  color: var(--brand, #ff7a5c);
}
html.dark .bv-react:hover,
body.dark .bv-react:hover,
html[data-theme="dark"] .bv-react:hover,
html.dark .bv-msg-tool:hover,
body.dark .bv-msg-tool:hover,
html[data-theme="dark"] .bv-msg-tool:hover,
html.dark .bv-fmt-btn:hover,
body.dark .bv-fmt-btn:hover,
html[data-theme="dark"] .bv-fmt-btn:hover {
  background: color-mix(in srgb, var(--ink) 8%, var(--surface, var(--bg)));
}
.bv-edited,
.bv-repost {
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0;
}
.bv-msg-card:has(.bv-edit) {
  width: 100%;
  max-width: min(100%, 52rem);
}
.bv-edit {
  width: 100%;
  min-width: 0;
  margin-top: 8px;
}
.bv-edit .bv-fmt {
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}
.bv-edit-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
  min-height: 140px;
  margin-top: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
  background: var(--surface-2, color-mix(in srgb, var(--ink) 4%, var(--surface, var(--bg))));
  color: var(--ink);
  font: inherit;
  line-height: 1.5;
  resize: vertical;
  overflow-wrap: anywhere;
  text-align: left;
}
.bv-repost-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.bv-repost-bar[hidden] {
  display: none !important;
}
.bv-repost-bar select {
  flex: 1 1 180px;
  font: inherit;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface, var(--bg));
  color: var(--ink);
}
.briefing-note code,
.bv-doc code {
  font-size: 0.88em;
}
@media (max-width: 720px) {
  .briefing-page { padding: 8px 12px 48px; }
  .briefing-header-actions { margin-left: auto; }
  .briefing-index-bar { flex-wrap: wrap; }
  .briefing-index-bar .briefing-search { flex-basis: min(100%, 320px); min-width: 0; }
  .briefing-index { columns: 1; }
}
