/* Base Styles */

body {
  font-size: 1.0rem;
  line-height: 1.3;
  font-weight: 400;
  font-family: "Roboto", "Trebuchet MS", Arial, sans-serif;
  color: #333;
  background: #FEFEFE;
}

/* Typography - targeting prose class */
.prose p {
  margin-bottom: 1em;
  line-height: 1.6;
}

.prose pre {
  white-space: pre-wrap;
  word-wrap: break-word;
  background-color: #f6f8fa;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  padding: 16px;
  margin: 1em 0;
  overflow-x: auto;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.875em;
  line-height: 1.45;
}

.prose code {
  background-color: #f6f8fa;
  border-radius: 3px;
  padding: 0.2em 0.4em;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.875em;
}

.prose pre code {
  background-color: transparent;
  border-radius: 0;
  padding: 0;
}

.prose blockquote {
  border-left: 4px solid #d0d7de;
  padding-left: 1em;
  margin: 1em 0;
  color: #656d76;
  font-style: italic;
}

.prose ul, .prose ol {
  margin: 1em 0;
  padding-left: 2em;
}

.prose li {
  margin: 0.25em 0;
}

.prose hr {
  border: none;
  border-top: 1px solid #d0d7de;
  margin: 2em 0;
}

.prose table {
  border-collapse: collapse;
  margin: 1em 0;
  width: 100%;
}

.prose th, .prose td {
  border: 1px solid #d0d7de;
  padding: 0.5em 0.75em;
  text-align: left;
}

.prose th {
  background-color: #f6f8fa;
  font-weight: 600;
}

.prose a {
  color: #0969da;
  text-decoration: none;
}

.prose a:hover {
  text-decoration: underline;
}

.prose strong, .prose b {
  font-weight: 600;
}

.prose em, .prose i {
  font-style: italic;
}

.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
  font-family: "Trebuchet MS", Arial, sans-serif;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  line-height: 1.2;
}

.prose h1 {
  font-size: 2.25em;
  font-weight: 600;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 0.3em;
}

.prose h2 {
  font-size: 1.875em;
  font-weight: 600;
}

.prose h3 {
  font-size: 1.5em;
  font-weight: 500;
}

.prose h4 {
  font-size: 1.25em;
  font-weight: 500;
}

.prose h5 {
  font-size: 1.125em;
  font-weight: 500;
}

.prose h6 {
  font-size: 1em;
  font-weight: 500;
  color: #666;
}

/* Media */
img, video {
  max-width: 100%;
  height: auto;
}

iframe {
  max-width: 100%;
}

/* Layout */
.container {
  display: flex;
  align-items: flex-start;
  max-width: 100%;
  padding: 0 20px;
}

#side-column {
  font-size: 0.9em;
  background-color: white;
  min-width: 12em;
  max-height: 80vh;
  padding: 20px;
  margin-right: 10px;
  overflow-y: auto;
  border-right: 2px solid #e5e7eb;
}

#side-column .navlinks ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

#side-column .navlinks li {
  margin-bottom: .7em;
}

#side-column .navlinks a {
  text-transform: uppercase;
  font-family: "Trebuchet MS", Arial, sans-serif;
  letter-spacing: .07rem;
  display: inline-block;
  padding: .2em 1em;
  background-color: #d6eaf8;
  color: #333;
  text-decoration: none;
  border: 1px #c0d4e4;
  border-radius: 6px;
  transition: background-color 0.3s ease;
}

#side-column .navlinks a:hover {
  background-color: #e4f4fc;
  color: #484848;
}

#side-column .navlinks button {
    background-color: #d6eaf8;
    padding: .2em 1em;
    color: #333;
    border: 1px #c0d4e4;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: .07rem;
    font-family: "Trebuchet MS", Arial, sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#main-column {
  max-width: 43em;
  background-color: white;
  padding: 0px 20px 20px 20px;
  flex-grow: 1;
  margin-left: 2em;
}

/* Header */
#header {
  font-family: "Roboto", "Trebuchet MS", Arial, sans-serif;
  font-size: 2.25rem;
  margin: 0.5em 0 0.2em;
  color: black;
  background: #d6eaf8;
  background: #f3f4f6;
  background: #1a2b4c;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 10px;
  padding-top: 10px;
}

#header-link {
  color: ghostwhite;
  text-decoration: none;
  text-transform: uppercase;
  font-family: "Roboto", sans-serif;
  font-size: 2rem;
  font-weight: 400;
  font-style: normal;
}

#hamburger-btn {
  font-size: 2rem;
  cursor: pointer;
  margin-right: 0.5em;
  color: white !important;
  background: transparent;
  border: none;
}

/* make space around All Pages table */
div#allPagesTableWrapper {
    margin: 3em 4em 1em 4em;
}

/* Utility Classes */
.hidden {
  display: none;
}

.floating {
  position: absolute;
  left: 10px;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.has-text-centered {
  text-align: center !important;
}

.allpages-max-width {
    max-width: 83% !important;
}

/* Recent Changes page abstract */
blockquote.recent-changes-page-abstract {
  margin-left: 2em;
}

/* transclusion error */
span.transclusion-error {
  color: #dd3333;
}

/* Footer */
.footer {
  background-color: #fafafa;
  padding: 2rem 0rem 3rem;
}

/* Buttons */
.button {
  background-color: white;
  border-color: #dbdbdb;
  border-width: 1px;
  color: #363636;
  cursor: pointer;
  justify-content: center;
  padding: calc(0.5em - 1px) 1em;
  text-align: center;
  white-space: nowrap;
}

.button.is-light {
  background-color: whitesmoke;
  background-color: transparent;
  border-color: transparent;
  color: rgba(0, 0, 0, 0.7);
}

/* Edit This Page */
.edit-this-page-button {
  font-family: "Trebuchet MS", Arial, sans-serif;
  display: inline-block;
  padding: .25em .5em;
  background-color: #d6eaf8;
  border: 1px #c0d4e4;
  color: #333;
  text-align: center;
  text-decoration: none;
  border-radius: .5em;
  transition: background-color 0.3s ease;
}

.edit-this-page-button a:hover {
  background-color: #e4f4fc;
  color: #484848;
}

/* incipient link */
span.incipient-wikilink {
  color: #dd3333;
  position: relative;
  display: inline-block;
  text-decoration: underline dashed;
  cursor: pointer;
}

/* body of incipient link popup */
span.incipient-wikilink::before {
  content: "No page exists for this link yet; one may be created in the future.";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #ee8;
  color: #000;
  padding: .1em .5em .1em .5em;
  border-radius: .5em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  white-space: nowrap;
}

/* display the incipient link popup */
span.incipient-wikilink:hover::before {
  opacity: 1;
}

/* the small "speech bubble" triangle under the incipient link popup */
span.incipient-wikilink:hover::after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  width: 0;
  height: 0;
  border: .5em solid transparent;
  border-top-color: #ee8;
  border-bottom: 0;
  margin-left: -.5em;
  margin-bottom: -.5em;
}

/* Enhanced Prose styling for markdown content */
.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
  font-family: 'Trebuchet MS', Arial, sans-serif !important;
  margin-top: 1.5em !important;
  margin-bottom: 0.5em !important;
  line-height: 1.2 !important;
}

.prose h1 {
  font-size: 2.25em !important;
  font-weight: 600 !important;
  border-bottom: 2px solid #e2e8f0 !important;
  padding-bottom: 0.3em !important;
}

.prose h2 {
  font-size: 1.875em !important;
  font-weight: 600 !important;
}

.prose h3 {
  font-size: 1.5em !important;
  font-weight: 500 !important;
}

.prose h4 {
  font-size: 1.25em !important;
  font-weight: 500 !important;
}

.prose h5 {
  font-size: 1.125em !important;
  font-weight: 500 !important;
}

.prose h6 {
  font-size: 1em !important;
  font-weight: 500 !important;
  color: #666 !important;
}

.prose p {
  margin-bottom: 1em !important;
  line-height: 1.6 !important;
}

.prose pre {
  white-space: pre-wrap !important;
  word-wrap: break-word !important;
  background-color: #f6f8fa !important;
  border: 1px solid #e1e4e8 !important;
  border-radius: 6px !important;
  padding: 16px !important;
  margin: 1em 0 !important;
  overflow-x: auto !important;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace !important;
  font-size: 0.875em !important;
  line-height: 1.45 !important;
}

.prose code {
  background-color: #f6f8fa !important;
  border-radius: 3px !important;
  padding: 0.2em 0.4em !important;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace !important;
  font-size: 0.875em !important;
}

.prose pre code {
  background-color: transparent !important;
  border-radius: 0 !important;
  padding: 0 !important;
}

.prose blockquote {
  border-left: 4px solid #d0d7de !important;
  padding-left: 1em !important;
  margin: 1em 0 !important;
  color: #656d76 !important;
  font-style: italic !important;
}

.prose ul, .prose ol {
  margin: 1em 0 !important;
  padding-left: 2em !important;
}

.prose li {
  margin: 0.25em 0 !important;
}

.prose hr {
  border: none !important;
  border-top: 1px solid #d0d7de !important;
  margin: 2em 0 !important;
}

.prose table {
  border-collapse: collapse !important;
  margin: 1em 0 !important;
  width: 100% !important;
}

.prose th, .prose td {
  border: 1px solid #d0d7de !important;
  padding: 0.5em 0.75em !important;
  text-align: left !important;
}

.prose th {
  background-color: #f6f8fa !important;
  font-weight: 600 !important;
}

.prose a {
  color: #0969da !important;
  text-decoration: none !important;
}

.prose a:hover {
  text-decoration: underline !important;
}

.prose strong, .prose b {
  font-weight: 600 !important;
}

.prose em, .prose i {
  font-style: italic !important;
}

.prose img, .prose video {
  max-width: 100% !important;
  height: auto !important;
}

.prose iframe {
  max-width: 100% !important;
}

/* Custom styles for sidebar navigation */
.sidebar-content .navlinks ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.sidebar-content .navlinks li {
  margin-bottom: 0.75rem;
}

.sidebar-content .navlinks a {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: #dbeafe;
  color: #374151;
  text-decoration: none;
  border: 1px solid #bfdbfe;
  border-radius: 0.375rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.875rem;
  font-family: 'Trebuchet MS', Arial, sans-serif;
  transition: all 0.3s ease;
}

.sidebar-content .navlinks a:hover {
  background-color: #bfdbfe;
  color: #1f2937;
}

.sidebar-content .navlinks button {
  padding: 0.5rem 1rem;
  background-color: #dbeafe;
  color: #374151;
  border: 1px solid #bfdbfe;
  border-radius: 0.375rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.875rem;
  font-family: 'Trebuchet MS', Arial, sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 767px) {
  #flex-container {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  
  #main-column {
    margin-left: 0;
  }
  
  #side-column.fixed {
    max-width: 280px !important;
  }
}

/* All Pages table wrapper */
div#allPagesTableWrapper {
  margin: 3rem 4rem 1rem 4rem;
}

.allpages-max-width {
  max-width: 83% !important;
}

/* Recent changes page abstract */
blockquote.recent-changes-page-abstract {
  margin-left: 2rem;
}

/* Transclusion error */
span.transclusion-error {
  color: #dc2626;
}

/* Incipient link styles */
span.incipient-wikilink {
  color: #dc2626;
  position: relative;
  display: inline-block;
  text-decoration: underline;
  text-decoration-style: dashed;
  cursor: pointer;
}

span.incipient-wikilink::before {
  content: "No page exists for this link yet; one may be created in the future.";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #fef3c7;
  color: #000;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  white-space: nowrap;
}

span.incipient-wikilink:hover::before {
  opacity: 1;
}

span.incipient-wikilink:hover::after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  width: 0;
  height: 0;
  border: 0.5rem solid transparent;
  border-top-color: #fef3c7;
  border-bottom: 0;
  margin-left: -0.5rem;
  margin-bottom: -0.5rem;
}

/* Utility Classes (replacing Tailwind CDN) */

/* Font families */
.font-roboto { font-family: 'Roboto', 'Trebuchet MS', Arial, sans-serif; }
.font-trebuchet { font-family: 'Trebuchet MS', Arial, sans-serif; }

/* Colors */
.text-gray-800 { color: #1f2937; }
.text-gray-700 { color: #374151; }
.text-gray-600 { color: #4b5563; }
.text-white { color: #ffffff; }
.text-blue-600 { color: #2563eb; }
.text-blue-800 { color: #1e40af; }
.text-blue-100 { color: #dbeafe; }
.text-red-600 { color: #dc2626; }
.text-yellow-700 { color: #a16207; }

.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-white { background-color: #ffffff; }
.bg-blue-100 { background-color: #dbeafe; }
.bg-blue-200 { background-color: #bfdbfe; }
.bg-blue-500 { background-color: #3b82f6; }
.bg-blue-600 { background-color: #2563eb; }
.bg-yellow-50 { background-color: #fefce8; }
.bg-yellow-100 { background-color: #fef3c7; }

.bg-gradient-to-r { background-image: linear-gradient(to right, var(--tw-gradient-stops)); }
.from-blue-500 { --tw-gradient-from: #3b82f6; --tw-gradient-to: #3b82f600; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.to-blue-600 { --tw-gradient-to: #2563eb; }

.border-gray-300 { border-color: #d1d5db; }
.border-blue-200 { border-color: #bfdbfe; }
.border-blue-700 { border-color: #1d4ed8; }
.border-yellow-400 { border-color: #facc15; }

/* Layout */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-end { justify-content: flex-end; }

.max-w-full { max-width: 100%; }
.max-w-3xl { max-width: 48rem; }
.max-w-none { max-width: none; }
.min-w-48 { min-width: 12rem; }

.flex-1 { flex: 1 1 0%; }
.flex-grow { flex-grow: 1; }

/* Spacing */
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.py-0 { padding-top: 0px; padding-bottom: 0px; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.pt-4 { padding-top: 1rem; }
.pb-5 { padding-bottom: 1.25rem; }
.pl-4 { padding-left: 1rem; }
.pl-5 { padding-left: 1.25rem; }

.m-0 { margin: 0px; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mr-2 { margin-right: 0.5rem; }
.mr-3 { margin-right: 0.75rem; }
.mr-4 { margin-right: 1rem; }
.ml-8 { margin-left: 2rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-12 { margin-top: 3rem; }
.my-6 { margin-top: 1.5rem; margin-bottom: 1.5rem; }

/* Typography */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }

.font-light { font-weight: 300; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }

.uppercase { text-transform: uppercase; }
.italic { font-style: italic; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-wider { letter-spacing: 0.05em; }

.leading-relaxed { line-height: 1.625; }

.text-center { text-align: center; }

.no-underline { text-decoration: none; }
.underline { text-decoration: underline; }

/* Borders */
.border { border-width: 1px; }
.border-b-2 { border-bottom-width: 2px; }
.border-r { border-right-width: 1px; }
.border-l-4 { border-left-width: 4px; }

.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }

/* Shadows */
.shadow-sm { box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }

/* Display */
.hidden { display: none; }
.inline-block { display: inline-block; }

/* Lists */
.list-disc { list-style-type: disc; }

/* Height */
.max-h-[80vh] { max-height: 80vh; }

/* Overflow */
.overflow-y-auto { overflow-y: auto; }

/* Transitions */
.transition-colors { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }

/* Hover states */
.hover\:text-blue-100:hover { color: #dbeafe; }
.hover\:text-blue-800:hover { color: #1e40af; }
.hover\:bg-blue-200:hover { background-color: #bfdbfe; }
.hover\:bg-blue-600:hover { background-color: #2563eb; }

/* Focus states */
.focus\:outline-none:focus { outline: 2px solid transparent; outline-offset: 2px; }
.focus\:ring-2:focus { --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); }
.focus\:ring-blue-500:focus { --tw-ring-color: #3b82f6; }
.focus\:border-transparent:focus { border-color: transparent; }

/* Space */
.space-y-1 > :not([hidden]) ~ :not([hidden]) { --tw-space-y-reverse: 0; margin-top: calc(0.25rem * calc(1 - var(--tw-space-y-reverse))); margin-bottom: calc(0.25rem * var(--tw-space-y-reverse)); }
.space-y-2 > :not([hidden]) ~ :not([hidden]) { --tw-space-y-reverse: 0; margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse))); margin-bottom: calc(0.5rem * var(--tw-space-y-reverse)); }

.gap-2 { gap: 0.5rem; }

/* Responsive utilities */
@media (min-width: 640px) {
  .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
}

@media (min-width: 1024px) {
  .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; }
}

/* Prose class for markdown content */
.prose { color: #374151; max-width: 65ch; }
.prose-gray { --tw-prose-body: #374151; --tw-prose-headings: #111827; }

/* Media Queries */
@media (max-width: 768px) {
  body {
    font-size: 16px;
  }
}
