/* ======================================================
   TYPOGRAPHY BASE
====================================================== */

body{
  font-family:Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size:14px;
  line-height:1.6;
  color:var(--mjv2-text);
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

/* ======================================================
   HEADINGS
====================================================== */

h1,h2,h3,h4,h5,h6{
  margin:0;
  color:var(--mjv2-text);
  font-weight:800;
  line-height:1.25;
  letter-spacing:-.02em;
}

h1{ font-size:32px; }
h2{ font-size:24px; }
h3{ font-size:20px; }
h4{ font-size:18px; }
h5{ font-size:16px; }
h6{ font-size:14px; }

/* ======================================================
   TEXT
====================================================== */

p{
  margin:0 0 1em;
  color:var(--mjv2-text);
}

p:last-child{
  margin-bottom:0;
}

small{
  font-size:12px;
}

strong{
  font-weight:700;
}

em{
  font-style:italic;
}

/* ======================================================
   LINKS
====================================================== */

a{
  color:var(--mjv2-primary);
  text-decoration:none;
  transition:color .16s ease, opacity .16s ease;
}

a:hover{
  color:var(--mjv2-primary-2);
}

a:focus-visible{
  outline:none;
  box-shadow:var(--mjv2-focus);
  border-radius:6px;
}

/* ======================================================
   PAGE TITLES
====================================================== */

.mjv2-page-title{
  margin:0;
  font-size:30px;
  font-weight:800;
  line-height:1.2;
  letter-spacing:-.025em;
  color:var(--mjv2-text);
}

.mjv2-page-subtitle{
  margin-top:6px;
  font-size:14px;
  line-height:1.55;
  color:var(--mjv2-muted);
}

/* ======================================================
   SECTION TITLES
====================================================== */

.mjv2-section-title{
  font-size:22px;
  font-weight:800;
  line-height:1.25;
  color:var(--mjv2-text);
}

.mjv2-section-subtitle{
  margin-top:4px;
  font-size:13px;
  line-height:1.5;
  color:var(--mjv2-muted);
}

/* ======================================================
   META TEXT
====================================================== */

.mjv2-meta{
  font-size:13px;
  line-height:1.5;
  color:var(--mjv2-muted);
}

.mjv2-meta-strong{
  color:var(--mjv2-text-soft);
  font-weight:600;
}

/* ======================================================
   LISTS
====================================================== */

ul,ol{
  margin:0 0 1em 1.25em;
  padding:0;
}

li{
  margin:.2em 0;
}

/* ======================================================
   BLOCKQUOTE
====================================================== */

blockquote{
  margin:0;
  padding:14px 16px;
  border-left:3px solid var(--mjv2-primary);
  background:rgba(255,255,255,.03);
  color:var(--mjv2-text-soft);
  border-radius:0 14px 14px 0;
}

/* ======================================================
   CODE
====================================================== */

code,
pre,
kbd,
samp{
  font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

code{
  padding:2px 6px;
  border-radius:8px;
  background:rgba(255,255,255,.04);
  color:var(--mjv2-text-soft);
  font-size:.92em;
}

pre{
  overflow:auto;
  padding:14px 16px;
  border-radius:14px;
  background:#0a101a;
  border:1px solid var(--mjv2-border);
  color:var(--mjv2-text-soft);
}

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

/* ======================================================
   PROSE
====================================================== */

.mjv2-prose{
  font-size:14px;
  line-height:1.75;
  color:var(--mjv2-text);
  word-break:break-word;
}

.mjv2-prose p{
  margin-bottom:1em;
}

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

.mjv2-prose h1,
.mjv2-prose h2,
.mjv2-prose h3,
.mjv2-prose h4{
  margin:1.2em 0 .55em;
}

.mjv2-prose ul,
.mjv2-prose ol{
  margin:0 0 1em 1.25em;
}

.mjv2-prose img{
  max-width:100%;
  height:auto;
  border-radius:12px;
  display:block;
}

.mjv2-prose a{
  text-decoration:underline;
  text-underline-offset:2px;
}

/* ======================================================
   TRUNCATION HELPERS
====================================================== */

.mjv2-truncate-1{
  display:-webkit-box;
  -webkit-line-clamp:1;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.mjv2-truncate-2{
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.mjv2-truncate-3{
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

/* ======================================================
   RESPONSIVE
====================================================== */

@media (max-width:768px){
  h1{ font-size:28px; }
  h2{ font-size:22px; }
  h3{ font-size:18px; }

  .mjv2-page-title{
    font-size:26px;
  }

  .mjv2-section-title{
    font-size:20px;
  }

  .mjv2-prose{
    font-size:13px;
    line-height:1.72;
  }
}

@media (max-width:480px){
  body{
    font-size:13px;
  }

  h1{ font-size:24px; }
  h2{ font-size:20px; }
  h3{ font-size:17px; }

  .mjv2-page-title{
    font-size:22px;
  }

  .mjv2-page-subtitle{
    font-size:13px;
  }

  .mjv2-section-title{
    font-size:18px;
  }

  .mjv2-section-subtitle,
  .mjv2-meta{
    font-size:12px;
  }

  .mjv2-prose{
    font-size:13px;
    line-height:1.68;
  }
}