/* ===========================
   Anthony Lopopolo — Publish Theme
   Matches Minimal theme + Flexoki Light
   Vault settings: 42rem width, 1.6 line-height, 18px font, 88% max-width
   =========================== */

/* --- Hide sidebars completely --- */
.site-body-left-column,
.site-body-left-column-site-name,
.nav-view-outer {
  visibility: hidden !important;
  flex: 0 !important;
  width: 0 !important;
  min-width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}

.site-body-right-column {
  visibility: hidden !important;
  flex: 0 !important;
  width: 0 !important;
  min-width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}

/* --- Hide auto-generated page title / site header --- */
.page-header,
.site-header {
  display: none !important;
}

/* --- Center content on page --- */
.site-body {
  display: flex !important;
  justify-content: center !important;
}

.site-body-center-column {
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 auto !important;
  text-align: left;
}

/* --- Content width: match vault 42rem / 756px --- */
.published-container {
  --line-width: 756px !important;
  --max-width: 100% !important;
  --font-normal: 18px;
  --line-height: 1.6;
  --font-text: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  --font-interface: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  --font-monospace: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;
  background-color: #FFFCF0;
  color: #100F0F;
}

.published-container .markdown-preview-sizer,
.published-container.is-readable-line-width .markdown-preview-sizer,
.markdown-preview-sizer.markdown-preview-section {
  max-width: 756px !important;
  min-width: 756px !important;
  width: 756px !important;
  margin: 0 auto !important;
}

.markdown-preview-view {
  max-width: 100% !important;
  width: 100% !important;
}

.render-container,
.render-container-inner,
.publish-renderer {
  max-width: 100% !important;
  width: 100% !important;
}

/* --- Base & Background --- */
body {
  background-color: #FFFCF0;
  color: #100F0F;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.6;
}

/* --- Typography --- */
.markdown-preview-view,
.markdown-rendered {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: #100F0F;
}

/* --- Headings (base — no underlines) --- */
h1, h4, h5, h6,
.el-h1 h1, .el-h4 h4, .el-h5 h5, .el-h6 h6 {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  color: #100F0F;
  font-weight: 600;
  line-height: 1.3;
  border-bottom: none !important;
  padding-bottom: 0 !important;
}

h1, .el-h1 h1 {
  font-size: 1.75em;
  margin-top: 0.5em;
  margin-bottom: 0.1em;
}

/* H2 — dark, bold, line stroke underneath */
h2, .el-h2 h2 {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  font-size: 1.3em;
  margin-top: 0.1em;
  margin-bottom: 0.25em;
  color: #100F0F;
  font-weight: 600;
  line-height: 1.3;
  border-bottom: 1px solid #E6E4D9 !important;
  padding-bottom: 0.3em !important;
}

/* H3 — no underline */
h3, .el-h3 h3 {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  font-size: 1.1em;
  color: #100F0F;
  font-weight: 600;
  line-height: 1.3;
  margin-top: 1.4em;
  margin-bottom: 0.3em;
  border-bottom: none !important;
  padding-bottom: 0 !important;
}

/* Space after the H3 container to match hr spacing */
.el-h3 {
  margin-bottom: 2em !important;
}

/* --- Links (Flexoki Red, no purple visited state) --- */
a,
a:link,
a:visited,
.markdown-preview-view a,
.markdown-preview-view a:link,
.markdown-preview-view a:visited,
.markdown-rendered a,
.markdown-rendered a:link,
.markdown-rendered a:visited,
.internal-link,
.internal-link:visited,
.external-link,
.external-link:visited {
  color: #AF3029 !important;
  text-decoration: none;
  transition: color 0.2s;
}

a:hover,
.markdown-preview-view a:hover,
.markdown-rendered a:hover,
.internal-link:hover,
.external-link:hover {
  color: #D14D41 !important;
  text-decoration: underline;
}

/* --- Horizontal Rules (only target Markdown hrs, not inline card hrs) --- */
.el-hr hr {
  border: none !important;
  border-top: 1px solid #E6E4D9 !important;
  margin: 2em 0 !important;
}

/* --- Blockquotes --- */
blockquote {
  border-left: 3px solid #AF3029;
  padding-left: 1em;
  margin-left: 0;
  color: #6F6E69;
  font-style: italic;
}

/* --- Bold & Italic --- */
strong { color: #100F0F; }
em { color: #6F6E69; }

/* --- Code Blocks --- */
code {
  font-family: "SF Mono", "Fira Code", monospace;
  background: #F2F0E5;
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 0.9em;
}

pre code {
  background: #F2F0E5;
  padding: 1em;
  border-radius: 6px;
  display: block;
  overflow-x: auto;
}

/* --- Smooth Scroll --- */
html {
  font-size: 18px;
  scroll-behavior: smooth;
}

/* ===========================
   Mobile Responsive
   =========================== */
@media screen and (max-width: 800px) {

  /* Let the sizer fill available width instead of fixed 756px */
  .published-container .markdown-preview-sizer,
  .published-container.is-readable-line-width .markdown-preview-sizer,
  .markdown-preview-sizer.markdown-preview-section {
    max-width: 100% !important;
    min-width: 0 !important;
    width: 100% !important;
    padding: 0 1.25rem !important;
    box-sizing: border-box !important;
  }

  /* Reduce heading sizes slightly for mobile */
  h1, .el-h1 h1 {
    font-size: 1.5em;
  }

  h2, .el-h2 h2 {
    font-size: 1.2em;
  }

  /* Card padding adjustments */
  .el-div div[style*="padding: 24px 28px"] {
    padding: 18px 20px !important;
  }

  .el-div div[style*="padding: 16px 22px"] {
    padding: 14px 18px !important;
  }
}
