@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/lib/fonts/archivo-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Audiowide';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/lib/fonts/audiowide-400.woff2') format('woff2');
}

html {
  background: #15110C;
  /* Render native form controls (date picker popup + calendar icon, select
     dropdowns, checkboxes) in their dark variant — without this the date
     input's picker icon is drawn near-black and invisible on this theme. */
  color-scheme: dark;
}

body {
  font-family: 'Archivo', system-ui, sans-serif;
}

.font-display {
  font-family: 'Audiowide', system-ui, sans-serif;
}

::selection {
  background: #2EC5F5;
  color: #0D2733;
}

/* Alpine cloaking: hide x-data elements until Alpine has initialized them,
   avoiding a flash of unbound {{ }}-style placeholders or raw markup. */
[x-cloak] {
  display: none !important;
}

audio::-webkit-media-controls-panel {
  background-color: #1c1710;
}

input[type="date"] {
  cursor: pointer;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.75;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

/* --- Rendered markdown (server-side Markdig output) ------------------------ */
.md-content p {
  margin: 0 0 0.9em;
}
.md-content p:last-child {
  margin-bottom: 0;
}
.md-content h1,
.md-content h2,
.md-content h3,
.md-content h4 {
  font-family: 'Audiowide', system-ui, sans-serif;
  font-weight: 400;
  color: #F6C95C;
  margin: 1.2em 0 0.5em;
}
.md-content h1:first-child,
.md-content h2:first-child,
.md-content h3:first-child {
  margin-top: 0;
}
.md-content h1 { font-size: 1.35em; }
.md-content h2 { font-size: 1.2em; }
.md-content h3 { font-size: 1.05em; }
.md-content a {
  color: #2EC5F5;
}
.md-content a:hover {
  color: #F6C95C;
}
.md-content strong {
  color: #F7E8C6;
}
.md-content ul,
.md-content ol {
  margin: 0 0 0.9em;
  padding-left: 1.4em;
}
.md-content ul { list-style: disc; }
.md-content ol { list-style: decimal; }
.md-content blockquote {
  border-left: 2px solid rgba(246, 201, 92, 0.5);
  padding-left: 0.9em;
  margin: 0 0 0.9em;
  color: #B9AE97;
  font-style: italic;
}
.md-content code {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.9em;
  background: rgba(247, 232, 198, 0.08);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}
.md-content hr {
  border: 0;
  border-top: 1px solid rgba(247, 232, 198, 0.15);
  margin: 1.2em 0;
}

/* --- EasyMDE dark theme + self-contained toolbar icons --------------------- */
.EasyMDEContainer .CodeMirror {
  background: #15110C !important;
  color: #F7E8C6 !important;
  border: 1px solid rgba(247, 232, 198, 0.2);
  border-radius: 0 0 0.25rem 0.25rem;
  min-height: 140px;
}
.EasyMDEContainer .CodeMirror-cursor {
  border-color: #F7E8C6;
}
/* Markdown syntax colors inside the editor (CodeMirror tokens). */
.EasyMDEContainer .cm-s-easymde .cm-header,
.EasyMDEContainer .CodeMirror .cm-header {
  color: #F6C95C;
}
.EasyMDEContainer .CodeMirror .cm-strong {
  color: #F7E8C6;
}
.EasyMDEContainer .CodeMirror .cm-em {
  color: #B9AE97;
}
.EasyMDEContainer .CodeMirror .cm-link {
  color: #2EC5F5;
}
.EasyMDEContainer .CodeMirror .cm-url {
  color: #8E9AA6;
}
.EasyMDEContainer .CodeMirror .cm-quote {
  color: #B9AE97;
  font-style: italic;
}
.EasyMDEContainer .CodeMirror .cm-formatting {
  color: #8E9AA6;
}
.EasyMDEContainer .CodeMirror-selected {
  background: rgba(46, 197, 245, 0.25) !important;
}
.EasyMDEContainer .CodeMirror-placeholder {
  color: #8E9AA6 !important;
}
.editor-toolbar {
  background: #1a150e;
  border: 1px solid rgba(247, 232, 198, 0.2);
  border-bottom: 0;
  border-radius: 0.25rem 0.25rem 0 0;
  opacity: 1;
}
.editor-toolbar button {
  color: #B9AE97 !important;
}
.editor-toolbar button:hover,
.editor-toolbar button.active {
  background: rgba(46, 197, 245, 0.15);
  border-color: transparent;
  color: #2EC5F5 !important;
}
.editor-toolbar i.separator {
  border-left: 1px solid rgba(247, 232, 198, 0.2);
  border-right: 0;
}
.editor-preview,
.editor-preview-side {
  background: #15110C;
  color: #B9AE97;
  border-color: rgba(247, 232, 198, 0.2);
}
/* Toolbar glyphs via CSS so no icon font is ever fetched from a CDN. */
.editor-toolbar button {
  min-width: 32px;
}
.editor-toolbar button i.fa {
  font-style: normal;
  font-family: 'Archivo', system-ui, sans-serif;
  font-size: 13px;
}
.editor-toolbar button i.fa::before {
  display: inline-block;
  min-width: 1em;
}
.editor-toolbar button i.fa-bold::before { content: "B"; font-weight: 800; }
.editor-toolbar button i.fa-italic::before { content: "I"; font-style: italic; font-weight: 600; }
.editor-toolbar button i.fa-header::before { content: "H"; font-weight: 700; }
.editor-toolbar button i.fa-list-ul::before { content: "\2022 \2022"; letter-spacing: 1px; }
.editor-toolbar button i.fa-list-ol::before { content: "1."; font-weight: 600; }
.editor-toolbar button i.fa-link::before { content: "\1F517"; font-size: 12px; }
.editor-toolbar button i.fa-eye::before { content: "\1F441"; font-size: 12px; }
