/* Static Site Template - Responsive Styles */

:root {
  --color-bg: #ffffff;
  --color-surface: #f8f9fd;
  --color-border: #e5e7eb;
  --color-text: #1f2937;
  --color-text-muted: #6b7280;
  --color-brand: #3b82f6;
  --color-brand-dark: #2563eb;
  --color-header-bg: #1a1a2e;
  --color-header-text: #ffffff;
  --color-hero-bg: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 100%);
  --sidebar-width: 320px;
  --content-max-width: 980px;
  --header-height: var(--vexy-menu-height, 64px);
  --transition-fast: 150ms ease;
  --transition-normal: 200ms ease;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Dark theme */
[data-theme="dark"] {
  --color-bg: #111827;
  --color-surface: #1f2937;
  --color-border: #374151;
  --color-text: #f9fafb;
  --color-text-muted: #9ca3af;
  --color-brand: #60a5fa;
  --color-brand-dark: #3b82f6;
  --color-header-bg: #0f0f1a;
  --color-hero-bg: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 100%);
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

/* Reserve CSI chrome space before the CDN custom elements upgrade. */
vexy-menu,
fontlab-menu {
  display: block;
  min-height: var(--vexy-menu-height, 64px);
  background: #1a1a1a;
}

vexy-footer,
fontlab-footer {
  display: block;
  min-height: 220px;
  background: #1a1a1a;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--color-brand);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-brand-dark);
}

button {
  font-family: inherit;
  cursor: pointer;
}

img {
  max-width: 100%;
  height: auto;
}

/* HEADER */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--color-header-bg);
  color: var(--color-header-text);
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
}

.header-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.header-logo:hover {
  opacity: 0.85;
}

.header-logo svg {
  width: 48px;
  height: 48px;
}

.header-logo-img {
  height: 48px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-left: auto;
}

.header-link {
  color: var(--color-header-text);
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0.9;
  transition: opacity var(--transition-fast);
}

.header-link:hover {
  opacity: 1;
  color: var(--color-header-text);
}

.header-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--color-brand);
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  border-radius: 999px;
  transition: background var(--transition-fast);
}

.header-btn:hover {
  background: var(--color-brand-dark);
  color: white;
}

.article-menu-btn {
  display: none;
  position: fixed;
  top: calc(var(--vexy-menu-height, 64px) + 0.75rem);
  left: 0.75rem;
  z-index: 70;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-text);
  box-shadow: var(--shadow-md);
}

/* HERO SECTION */
.hero {
  background: var(--color-hero-bg);
  padding: 4rem 1.5rem;
  text-align: center;
  color: white;
}

.hero-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1rem;
  opacity: 0.85;
  max-width: 800px;
  margin: 0 auto 2rem;
}

.hero-search {
  max-width: 580px;
  margin: 0 auto;
  position: relative;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--color-bg);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
}

.search-icon {
  position: absolute;
  left: 1rem;
  width: 20px;
  height: 20px;
  color: var(--color-text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  font-size: 1rem;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--color-text);
  outline: none;
}

.search-input:focus {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-brand) 20%, transparent);
}

.search-input::placeholder {
  color: var(--color-text-muted);
}

.search-shortcut {
  position: absolute;
  right: 1rem;
  padding: 0.25rem 0.5rem;
  background: var(--color-surface);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

/* FEATURED TILES */
.tiles-section {
  padding: 3rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.static-article-links {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tiles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.tile {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.tile:hover {
  border-color: var(--color-brand);
  box-shadow: var(--shadow-md);
  color: inherit;
}

.tile-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-brand);
}

.tile-icon svg {
  width: 56px;
  height: 56px;
}

.tile-icon .material-symbols-outlined {
  font-size: 56px;
}

.tile-content {
  flex: 1;
  min-width: 0;
}

.tile-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--color-text);
}

.tile-description {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* FOOTER */
.footer {
  margin-top: auto;
  padding: 1.5rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

.footer-viewer {
  align-items: stretch;
  text-align: left;
}

.footer-viewer-inner {
  width: min(var(--content-max-width), calc(100% - var(--sidebar-width) - 4rem));
  margin-left: calc(var(--sidebar-width) + 2rem);
  margin-right: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-viewer .footer-links,
.footer-viewer .footer-social {
  justify-content: flex-start;
}

.footer-link {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.footer-link:hover {
  color: var(--color-text);
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  color: var(--color-text-muted);
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.footer-social a:hover {
  border-color: var(--color-brand);
  color: var(--color-brand);
}

.article-copyright {
  margin-left: var(--sidebar-width);
  padding: 0 2rem 1rem;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  line-height: 1.3;
  opacity: 0.65;
}

.article-copyright > div {
  max-width: var(--content-max-width);
  margin: 0 auto;
}

.article-bottom-nav {
  width: 100%;
  max-width: var(--content-max-width);
  margin: 1.75rem auto 0;
  padding: 0 0 0.75rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(2rem, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
}

.article-bottom-nav-link {
  min-width: 0;
  color: var(--color-text-muted);
  text-decoration: none;
  border-radius: 12px;
  transition: color var(--transition-fast), background-color var(--transition-fast), transform var(--transition-fast);
}

.article-bottom-nav-link:not(.article-bottom-nav-empty) {
  padding: 0.5rem 0.25rem;
}

.article-bottom-nav-link:hover,
.article-bottom-nav-link:focus-visible {
  color: var(--color-text);
}

.article-bottom-nav-link:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 4px;
}

.article-bottom-nav-label {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--color-text-muted);
  font-size: 0.625rem;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.55;
}

.article-bottom-nav-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 600;
}

.article-bottom-nav-title {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.article-bottom-nav-arrow {
  flex: 0 0 auto;
  font-size: 1.55rem;
  line-height: 1;
  font-weight: 400;
  color: var(--color-text);
  opacity: 0.8;
}

.article-bottom-nav-prev {
  justify-self: start;
  width: 100%;
}

.article-bottom-nav-next {
  justify-self: end;
  width: 100%;
  text-align: right;
}

.article-bottom-nav-next .article-bottom-nav-row {
  justify-content: flex-end;
}

.article-bottom-nav-spacer {
  min-width: 0;
}

.article-bottom-nav-empty {
  pointer-events: none;
}

/* VIEWER LAYOUT */
.viewer-shell {
  display: flex;
  flex: 1;
  min-height: 0;
  padding-top: var(--header-height);
}

.csi-chrome .viewer-shell {
  padding-top: 0;
}

.sidebar {
  position: fixed;
  top: var(--vexy-menu-height, 64px);
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  z-index: 50;
  transform: translateX(0);
  transition: transform var(--transition-normal);
}

.sidebar.hidden {
  transform: translateX(-100%);
}

.sidebar-header {
  padding: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.sidebar-search {
  position: relative;
}

.sidebar-search-input {
  width: 100%;
  padding: 0.625rem 0.75rem 0.625rem 2.25rem;
  font-size: 0.875rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg);
  color: var(--color-text);
  outline: none;
  transition: border-color var(--transition-fast);
}

.sidebar-search-input:focus {
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-brand) 20%, transparent);
}

.sidebar-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--color-text-muted);
  pointer-events: none;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
}

/* Search Results Dropdown */
.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 0.25rem;
  max-height: 400px;
  overflow-y: auto;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  z-index: 60;
}

.search-results[hidden] {
  display: none;
}

.search-result-item {
  display: block;
  padding: 0.75rem;
  cursor: pointer;
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition-fast);
  text-align: left;
  text-decoration: none;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover,
.search-result-item:focus {
  background: var(--color-surface);
  outline: 2px solid var(--color-brand);
  outline-offset: -2px;
}

.search-result-title {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--color-text);
}

.search-result-snippet {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-highlight {
  background: color-mix(in srgb, var(--color-brand) 20%, transparent);
  font-weight: 600;
}

/* Tree Navigation */
.tree-chapter {
  margin-bottom: 0.25rem;
}

.tree-chapter-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background var(--transition-fast);
}

.tree-chapter-header:hover {
  background: var(--color-border);
}

.tree-chapter-icon {
  width: 16px;
  height: 16px;
  color: var(--color-text-muted);
  transition: transform var(--transition-fast);
}

.tree-chapter.open .tree-chapter-icon {
  transform: rotate(90deg);
}

.tree-chapter-articles {
  display: none;
  padding-left: 1.5rem;
}

.tree-chapter.open .tree-chapter-articles {
  display: block;
}

.tree-article {
  display: block;
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  width: 100%;
  text-align: left;
  text-decoration: none;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.tree-article:hover {
  background: var(--color-border);
  color: var(--color-text);
}

.tree-article.active {
  background: color-mix(in srgb, var(--color-brand) 10%, transparent);
  color: var(--color-brand);
  font-weight: 500;
}

/* Content Area */
.content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 2rem;
  max-width: calc(100% - var(--sidebar-width));
}

.content.full-width {
  margin-left: 0;
  max-width: 100%;
}

.article-container {
  max-width: var(--content-max-width);
  margin: 0 auto;
}

/* Theme Toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: transparent;
  border: none;
  color: var(--color-header-text);
  opacity: 0.8;
  transition: opacity var(--transition-fast);
}

.theme-toggle:hover {
  opacity: 1;
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

/* MARKDOWN CONTENT */
.markdown-body {
  font-size: 1rem;
  line-height: 1.7;
}

.markdown-body h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 1.5rem;
  line-height: 1.3;
}

.markdown-body h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 2rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

.markdown-body h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem;
}

.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.25rem 0 0.5rem;
}

.markdown-body p {
  margin: 1rem 0;
}

.markdown-body ul,
.markdown-body ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.markdown-body li {
  margin: 0.25rem 0;
}

.markdown-body blockquote {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--color-brand);
  background: var(--color-surface);
  border-radius: 0 8px 8px 0;
}

.markdown-body blockquote p {
  margin: 0;
}

.markdown-body blockquote.blockquote--author {
  margin: 2rem 0 1.5rem auto;
  padding: 0 1.5rem 0 0;
  border-left: 0;
  border-right: 1px solid var(--color-border);
  text-align: right;
}

.markdown-body blockquote.blockquote--author p {
  margin: 0;
}

.markdown-body blockquote.blockquote--author p:first-child {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.markdown-body p.blockquote--author {
  margin: 2rem 0 1.5rem auto;
  padding: 0 1.5rem 0 0;
  border-right: 1px solid var(--color-border);
  text-align: right;
  line-height: 1.25;
}

.markdown-body p.blockquote--author strong {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.markdown-body p.blockquote--author a {
  display: block;
  color: var(--color-text);
  font-size: 1rem;
  font-weight: 400;
  text-decoration: none;
}

.markdown-body pre {
  margin: 1rem 0;
  padding: 1rem;
  background: #1a1a2e;
  color: #f8f8f2;
  border-radius: 8px;
  overflow-x: auto;
  font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.markdown-body pre::-webkit-scrollbar {
  height: 8px;
}

.markdown-body pre::-webkit-scrollbar-track {
  background: transparent;
}

.markdown-body pre::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 4px;
}

.markdown-body pre::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.35);
}

.markdown-body code {
  font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
  font-size: 0.875em;
  background: var(--color-surface);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
}

.markdown-body pre code {
  background: transparent;
  padding: 0;
}

/* Default image styles */
.markdown-body img {
  max-width: 100%;
  height: auto;
}

/* Inline vs block images in markdown:
   - If an image is embedded in a text container, keep it inline.
   - If a container contains only an image, keep it as a block with spacing. */
.markdown-body .md-img-inline > img {
  display: inline-block !important;
  vertical-align: middle;
  margin: 0 !important;
}
.markdown-body .md-img-inline > a > img {
  display: inline-block !important;
  vertical-align: middle;
  margin: 0 !important;
}

.markdown-body .md-img-block > img,
.markdown-body .md-img-block > a > img {
  display: block !important;
  margin: 1rem 0 !important;
}

/* Block images: when image is the only content in a paragraph */
.markdown-body p > img:only-child,
.markdown-body p > a:only-child > img {
  display: block;
  border-radius: 8px;
  margin: 1rem 0;
}

/* Inline images: when paragraph has other content alongside the image */
.markdown-body p:not(:has(> img:only-child)):not(:has(> a:only-child)) img {
  display: inline;
  vertical-align: middle;
  margin: 0 0.2em;
  border-radius: 0;
}

/* Images in table cells should also be handled */
.markdown-body td img,
.markdown-body th img {
  display: block;
  border-radius: 8px;
  margin: 0.5rem 0;
}

[data-theme="dark"] .markdown-body img[src*=".svg" i] {
  filter: invert(1) hue-rotate(180deg);
}

[data-theme="dark"] .markdown-body img[src*=".png" i] {
  background: #fff;
  padding: 0;
  border-radius: 0;
  border: none;
}

.markdown-body table {
  width: 100%;
  margin: 1rem 0;
  border-collapse: collapse;
  overflow-x: auto;
  display: block;
}

.markdown-body th,
.markdown-body td {
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
}

.markdown-body th {
  background: var(--color-surface);
  font-weight: 600;
  white-space: nowrap;
}

.markdown-body tr:nth-child(even) td {
  background: rgba(0, 0, 0, 0.02);
}

.markdown-body hr {
  margin: 2rem 0;
  border: none;
  border-top: 1px solid var(--color-border);
}

.markdown-body a {
  color: var(--color-brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.markdown-body a:hover {
  color: var(--color-brand-dark);
}

.markdown-body kbd {
  display: inline-block;
  padding: 0.125rem 0.375rem;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 500;
  font-size: 0.875em;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  box-shadow: 0 1px 0 var(--color-border);
}

.markdown-body .md-samp-path {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.14rem 0.42rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.86em;
  font-style: normal;
  line-height: 1.25;
  white-space: nowrap;
  vertical-align: baseline;
}

.markdown-body .md-samp-path-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  font-family: inherit;
  font-style: normal;
}

.markdown-body .md-samp-path-item + .md-samp-path-item::before {
  content: "›";
  color: var(--color-text-muted);
  font-size: 0.9em;
}

.markdown-body .md-callout {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 1.1rem 0;
  color: var(--color-text);
}

.markdown-body .md-callout-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: var(--color-text-muted);
  font-family: "Material Symbols Outlined", "Material Symbols Rounded";
  font-size: 1.35rem;
  line-height: 1;
  font-variation-settings: "FILL" 1, "wght" 700, "GRAD" 0, "opsz" 24;
}

.markdown-body .md-callout-label {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.markdown-body .md-callout-info .md-callout-icon {
  color: #13b8d0;
}

.markdown-body .md-callout-tip .md-callout-icon {
  color: #00b894;
}

.markdown-body .md-callout-question .md-callout-icon {
  color: #58d82f;
}

.markdown-body .md-callout-warning .md-callout-icon {
  color: #f59e0b;
}

/* LOADING & EMPTY STATES */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem;
  color: var(--color-text-muted);
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--color-text-muted);
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  opacity: 0.5;
}

/* RESPONSIVE BREAKPOINTS */

/* Tablet */
@media (max-width: 1024px) {
  .tiles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .content {
    margin-left: 0;
    max-width: 100%;
  }

  .article-copyright {
    margin-left: 0;
  }

  .article-menu-btn {
    display: flex;
  }
  
  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 40;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
  }
  
  .sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }

  .footer-viewer-inner {
    width: min(var(--content-max-width), calc(100% - 4rem));
    margin-left: 2rem;
  }
}

/* Mobile */
@media (max-width: 640px) {
  :root {
    --header-height: var(--vexy-menu-height, 64px);
  }
  
  .hero {
    padding: calc(var(--header-height) + 2rem) 1rem 2rem;
  }
  
  .hero-title {
    font-size: 1.75rem;
  }
  
  .hero-subtitle {
    font-size: 0.875rem;
  }
  
  .search-input {
    padding: 0.875rem 0.875rem 0.875rem 2.75rem;
    font-size: 0.9375rem;
  }
  
  .tiles-section {
    padding: 2rem 1rem;
  }
  
  .tiles-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .tile {
    padding: 1.25rem;
  }
  
  .header {
    padding: 0 1rem;
  }

  .header-nav {
    gap: 0.5rem;
  }
  
  .header-link {
    display: none;
  }

  .header-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
  }
  
  .header-logo svg {
    width: 36px;
    height: 36px;
  }

  .header-logo-img {
    height: 36px;
  }
  
  .footer {
    padding: 1rem;
  }

  .footer-viewer-inner {
    width: calc(100% - 2rem);
    margin-left: 1rem;
  }
  
  .content {
    padding: 1.5rem 1rem;
  }

  .article-copyright {
    padding: 0 1rem 0.75rem;
  }

  .article-bottom-nav {
    margin-top: 1.5rem;
    grid-template-columns: minmax(0, 1fr) 1rem minmax(0, 1fr);
    gap: 0.5rem;
  }

  .article-bottom-nav-link:not(.article-bottom-nav-empty) {
    padding: 0.375rem 0;
  }

  .article-bottom-nav-label {
    font-size: 0.5625rem;
  }

  .article-bottom-nav-row {
    gap: 0.375rem;
    font-size: 0.875rem;
  }

  .article-bottom-nav-arrow {
    font-size: 1.25rem;
  }
  
  .markdown-body h1 {
    font-size: 1.5rem;
  }
  
  .markdown-body h2 {
    font-size: 1.25rem;
  }
  
  .markdown-body pre {
    font-size: 0.8125rem;
    padding: 0.75rem;
  }
}

/* Print styles */
@media print {
  .header,
  .sidebar,
  .footer,
  .theme-toggle,
  .article-bottom-nav,
  vexy-menu,
  vexy-footer,
  fontlab-menu,
  fontlab-footer,
  .article-menu-btn {
    display: none !important;
  }
  
  .content {
    margin-left: 0 !important;
    max-width: 100% !important;
    padding: 0 !important;
  }
  
  .viewer-shell {
    padding-top: 0 !important;
  }
}

/* Custom CSS */
.markdown-body h1 {
  color:rgb(233, 30, 140);
margin-top:0px;
}

.markdown-body h2 {
  font-weight:300;
font-size:2rem;
margin:2rem 0 1.5rem 0;
}


/* Custom light theme - global */
:root {
  --color-brand: #e91e8c;
  --color-brand-dark: #c61a77;
}

/* Custom dark theme - global */
[data-theme="dark"] {
  --color-brand: #e91e8c;
  --color-brand-dark: #c61a77;
}
