.font-system {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
    "Segoe UI Symbol" !important;
}

/* Apply to all child elements as well */
.font-system * {
  font-family: inherit !important;
}

/* System default font for document content */

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Radio button styling - force black selection color */
input[type="radio"] {
  accent-color: #111827; /* gray-900 equivalent */
}

[x-cloak] {
  display: none !important;
}

/* Markdown Typography Styles */
.prose {
  color: #374151;
  line-height: 1.75;
  font-size: 1rem;
}

/* Headings */
.prose h1 {
  color: #111827;
  font-weight: 800;
  font-size: 2.25rem;
  margin-top: 0;
  margin-bottom: 0.8888889rem;
  line-height: 1.1111111;
}

.prose h2 {
  color: #111827;
  font-weight: 700;
  font-size: 1.875rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  line-height: 1.3333333;
}

.prose h3 {
  color: #111827;
  font-weight: 600;
  font-size: 1.5rem;
  margin-top: 1.6rem;
  margin-bottom: 0.6rem;
  line-height: 1.6;
}

.prose h4 {
  color: #111827;
  font-weight: 600;
  font-size: 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.prose h5 {
  color: #111827;
  font-weight: 600;
  font-size: 1.125rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.prose h6 {
  color: #111827;
  font-weight: 600;
  font-size: 1rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

/* Paragraphs */
.prose p {
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
}

/* Links */
.prose a {
  color: #2563eb;
  text-decoration: underline;
  font-weight: 500;
}

.prose a:hover {
  color: #1d4ed8;
}

/* Strong and emphasis */
.prose strong {
  color: #111827;
  font-weight: 600;
}

.prose em {
  color: #111827;
  font-style: italic;
}

/* Lists */
.prose ul {
  list-style-type: disc;
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
  padding-left: 1.625rem;
}

.prose ol {
  list-style-type: decimal;
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
  padding-left: 1.625rem;
}

.prose li {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.prose li p {
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
}

.prose ul ul,
.prose ul ol,
.prose ol ul,
.prose ol ol {
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
}

/* Blockquotes */
.prose blockquote {
  font-weight: 500;
  font-style: italic;
  color: #111827;
  border-left: 0.25rem solid #e5e7eb;
  quotes: "\201C""\201D""\2018""\2019";
  margin-top: 1.6rem;
  margin-bottom: 1.6rem;
  padding-left: 1rem;
}

.prose blockquote p:first-of-type::before {
  content: open-quote;
}

.prose blockquote p:last-of-type::after {
  content: close-quote;
}

/* Code */
.prose code {
  color: #111827;
  font-weight: 600;
  font-size: 0.875rem;
  background-color: #f3f4f6;
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas,
    "Liberation Mono", Menlo, monospace;
}

.prose pre {
  color: #e5e7eb;
  background-color: #1f2937;
  overflow-x: auto;
  font-weight: 400;
  font-size: 0.875rem;
  line-height: 1.7142857;
  margin-top: 1.7142857rem;
  margin-bottom: 1.7142857rem;
  border-radius: 0.375rem;
  padding: 0.8571429rem 1.1428571rem;
}

.prose pre code {
  background-color: transparent;
  border-width: 0;
  border-radius: 0;
  padding: 0;
  color: inherit;
  font-size: inherit;
  font-family: inherit;
  font-weight: inherit;
  line-height: inherit;
}

/* Tables */
.prose table {
  width: 100%;
  table-layout: auto;
  text-align: left;
  margin-top: 2rem;
  margin-bottom: 2rem;
  font-size: 0.875rem;
  line-height: 1.7142857;
  border-collapse: collapse;
}

.prose thead {
  border-bottom: 1px solid #d1d5db;
}

.prose thead th {
  color: #111827;
  font-weight: 600;
  vertical-align: bottom;
  padding-right: 0.5714286rem;
  padding-bottom: 0.5714286rem;
  padding-left: 0.5714286rem;
}

.prose tbody tr {
  border-bottom: 1px solid #e5e7eb;
}

.prose tbody tr:last-child {
  border-bottom-width: 0;
}

.prose tbody td {
  vertical-align: baseline;
  padding: 0.5714286rem;
}

/* Images */
.prose img {
  margin-top: 2rem;
  margin-bottom: 2rem;
  max-width: 100%;
  height: auto;
}

/* Horizontal rules */
.prose hr {
  border-color: #e5e7eb;
  border-top-width: 1px;
  margin-top: 3rem;
  margin-bottom: 3rem;
}

/* Task lists (GitHub-style checkboxes) */
.prose ul[data-type="taskList"] {
  list-style: none;
  padding-left: 0;
}

.prose ul[data-type="taskList"] li {
  display: flex;
  align-items: flex-start;
}

.prose ul[data-type="taskList"] li input[type="checkbox"] {
  margin-right: 0.5rem;
  margin-top: 0.125rem;
  flex-shrink: 0;
}

/* Alternative task list styling for common markdown parsers */
.prose li input[type="checkbox"] {
  margin-right: 0.5rem;
  margin-top: 0.125rem;
}

.prose li:has(input[type="checkbox"]) {
  list-style: none;
  margin-left: -1.625rem;
  padding-left: 1.625rem;
}

/* Inline elements */
.prose kbd {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas,
    "Liberation Mono", Menlo, monospace;
  font-size: 0.875rem;
  color: #111827;
  background-color: #f9fafb;
  border: 1px solid #d1d5db;
  border-radius: 0.25rem;
  padding: 0.125rem 0.25rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.prose mark {
  background-color: #fef3c7;
  color: #92400e;
  padding: 0.125rem 0.25rem;
  border-radius: 0.125rem;
}

.prose sub,
.prose sup {
  font-size: 0.75rem;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

.prose sub {
  bottom: -0.25rem;
}

.prose sup {
  top: -0.5rem;
}

/* Strikethrough */
.prose del,
.prose s {
  color: #6b7280;
  text-decoration: line-through;
}

/* Abbreviations */
.prose abbr {
  text-decoration: underline dotted;
  cursor: help;
}

/* Definition lists */
.prose dl {
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
}

.prose dt {
  color: #111827;
  font-weight: 600;
  margin-top: 1.25rem;
}

.prose dd {
  margin-top: 0.5rem;
  padding-left: 1.625rem;
}

/* Footnotes */
.prose .footnote-ref {
  font-size: 0.75rem;
  vertical-align: super;
  text-decoration: none;
}

.prose .footnote-backref {
  text-decoration: none;
}

.prose .footnotes {
  font-size: 0.875rem;
  margin-top: 2rem;
  border-top: 1px solid #e5e7eb;
  padding-top: 1rem;
}

.prose .footnotes ol {
  padding-left: 1rem;
}

/* Figure and figcaption */
.prose figure {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.prose figcaption {
  color: #6b7280;
  font-size: 0.875rem;
  line-height: 1.4285714;
  margin-top: 0.8571429rem;
  text-align: center;
}

/* Address */
.prose address {
  color: #111827;
  font-size: 0.875rem;
  line-height: 1.7142857;
  margin-top: 1.7142857rem;
  margin-bottom: 1.7142857rem;
  font-style: normal;
}

/* Reset margins for first and last children */
.prose > :first-child {
  margin-top: 0;
}

.prose > :last-child {
  margin-bottom: 0;
}

/* Chat Panel Contextual Styles */
/* Default/Meeting Context - Blue */
.chat-panel--default .chat-panel__header,
.chat-panel--meeting .chat-panel__header {
  background-color: #dbeafe; /* bg-blue-100 */
  border-color: #bfdbfe; /* border-blue-200 */
}

.chat-panel--default .chat-panel__title,
.chat-panel--meeting .chat-panel__title {
  color: #1d4ed8; /* text-blue-700 */
}

.chat-panel--default .chat-panel__description,
.chat-panel--meeting .chat-panel__description {
  color: #1d4ed8; /* text-blue-700 */
}

.chat-panel--default .chat-panel__icon,
.chat-panel--meeting .chat-panel__icon {
  color: #2563eb; /* text-blue-600 */
}

.chat-panel--default .chat-panel__send-button,
.chat-panel--meeting .chat-panel__send-button {
  background-color: #2563eb; /* bg-blue-600 */
  color: white;
}

.chat-panel--default .chat-panel__send-button:hover,
.chat-panel--meeting .chat-panel__send-button:hover {
  background-color: #1d4ed8; /* hover:bg-blue-700 */
}

/* Item/Attachment Context - Blue (same as default/meeting) */
.chat-panel--item .chat-panel__header,
.chat-panel--attachment .chat-panel__header {
  background-color: #dbeafe; /* bg-blue-100 */
  border-color: #bfdbfe; /* border-blue-200 */
}

.chat-panel--item .chat-panel__title,
.chat-panel--attachment .chat-panel__title {
  color: #1d4ed8; /* text-blue-700 */
}

.chat-panel--item .chat-panel__description,
.chat-panel--attachment .chat-panel__description {
  color: #1d4ed8; /* text-blue-700 */
}

.chat-panel--item .chat-panel__icon,
.chat-panel--attachment .chat-panel__icon {
  color: #2563eb; /* text-blue-600 */
}

.chat-panel--item .chat-panel__send-button,
.chat-panel--attachment .chat-panel__send-button {
  background-color: #2563eb; /* bg-blue-600 */
  color: white;
}

.chat-panel--item .chat-panel__send-button:hover,
.chat-panel--attachment .chat-panel__send-button:hover {
  background-color: #1d4ed8; /* hover:bg-blue-700 */
}

/* Policy Context - Green */
.chat-panel--policy .chat-panel__header,
.chat-panel--item_policy .chat-panel__header {
  background-color: #dcfce7; /* bg-green-100 */
  border-color: #bbf7d0; /* border-green-200 */
}

.chat-panel--policy .chat-panel__title,
.chat-panel--item_policy .chat-panel__title {
  color: #15803d; /* text-green-700 */
}

.chat-panel--policy .chat-panel__description,
.chat-panel--item_policy .chat-panel__description {
  color: #15803d; /* text-green-700 */
}

.chat-panel--policy .chat-panel__icon,
.chat-panel--item_policy .chat-panel__icon {
  color: #16a34a; /* text-green-600 */
}

.chat-panel--policy .chat-panel__send-button,
.chat-panel--item_policy .chat-panel__send-button {
  background-color: #16a34a; /* bg-green-600 */
  color: white;
}

.chat-panel--policy .chat-panel__send-button:hover,
.chat-panel--item_policy .chat-panel__send-button:hover {
  background-color: #15803d; /* hover:bg-green-700 */
}

/* Roberts Rules Context - Amber */
.chat-panel--roberts-rules .chat-panel__header,
.chat-panel--rr .chat-panel__header {
  background-color: #fef3c7; /* bg-amber-100 */
  border-color: #fde68a; /* border-amber-200 */
}

.chat-panel--roberts-rules .chat-panel__title,
.chat-panel--rr .chat-panel__title {
  color: #b45309; /* text-amber-700 */
}

.chat-panel--roberts-rules .chat-panel__description,
.chat-panel--rr .chat-panel__description {
  color: #b45309; /* text-amber-700 */
}

.chat-panel--roberts-rules .chat-panel__icon,
.chat-panel--rr .chat-panel__icon {
  color: #d97706; /* text-amber-600 */
}

.chat-panel--roberts-rules .chat-panel__send-button,
.chat-panel--rr .chat-panel__send-button {
  background-color: #d97706; /* bg-amber-600 */
  color: white;
}

.chat-panel--roberts-rules .chat-panel__send-button:hover,
.chat-panel--rr .chat-panel__send-button:hover {
  background-color: #b45309; /* hover:bg-amber-700 */
}
