/* Shared visual system for standalone technical articles. */
:root {
  --blog-ink: #172033;
  --blog-muted: #5e6b7e;
  --blog-blue: #2457a7;
  --blog-line: #e1e7ef;
  --blog-paper: #fff;
  --blog-wash: #f4f7fb;
}
html { scroll-behavior: smooth; }
body {
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #f5f7fa !important;
  color: var(--blog-ink) !important;
  font: 16px/1.75 "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif !important;
}
body > header {
  display: block !important;
  max-width: none !important;
  margin: 0 !important;
  padding: clamp(2.5rem, 7vw, 5rem) 1.25rem 2.4rem !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: linear-gradient(125deg, #102846, #2457a7) !important;
  color: #fff !important;
  text-align: center !important;
}
body > header h1 {
  max-width: 900px;
  margin: .7rem auto .5rem !important;
  color: #fff !important;
  font: 700 clamp(2rem, 5vw, 3.4rem)/1.13 "Raleway", system-ui, sans-serif !important;
}
body > header p { max-width: 720px; margin: .75rem auto 0 !important; color: #d8e6f8 !important; }
.site-home-link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem .9rem;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px;
  color: #fff !important;
  font-size: .9rem;
  text-decoration: none;
  transition: background .2s ease, transform .2s ease;
}
.site-home-link:hover { background: rgba(255,255,255,.13); transform: translateY(-1px); }
.article-home { width: min(100% - 2rem, 880px); margin: 1rem auto 0; }
.article-home .site-home-link { border-color: #cbd6e4; color: var(--blog-blue) !important; background: #fff; }
.article-home .site-home-link:hover { background: #edf3fb; }
body > main, body > .article-content, body > article, body > .container, body > .wrap,
body > div.wrap, body > div.container, body > div#main {
  width: min(100% - 2rem, 880px) !important;
  max-width: 880px !important;
  margin: 2rem auto 4rem !important;
  padding: clamp(1.25rem, 4vw, 3rem) !important;
  border: 1px solid var(--blog-line);
  border-radius: 18px;
  background: var(--blog-paper) !important;
  box-shadow: 0 16px 44px rgba(24, 42, 68, .07);
}
body > .wrap > header { padding: 0 0 1rem !important; background: transparent !important; color: var(--blog-ink) !important; text-align: left !important; }
body > .wrap > header h1 { color: var(--blog-ink) !important; font-size: clamp(1.8rem, 4vw, 2.5rem) !important; }
article { color: var(--blog-ink); }
h2, h3, h4 { color: #1e385d !important; font-family: "Raleway", system-ui, sans-serif !important; line-height: 1.3; }
h2 { margin-top: 2rem; padding-bottom: .45rem; border-bottom: 1px solid var(--blog-line); font-size: clamp(1.35rem, 3vw, 1.75rem); }
h3 { margin-top: 1.5rem; font-size: 1.2rem; }
p, li { color: inherit; }
a { color: var(--blog-blue); text-underline-offset: 3px; }
a:hover { color: #123d7c; }
pre {
  max-width: 100%;
  overflow: auto !important;
  padding: 1rem 1.2rem !important;
  border: 1px solid #23344c !important;
  border-radius: 10px !important;
  background: #111d2e !important;
  color: #e4edf8 !important;
  font: .9rem/1.65 ui-monospace, SFMono-Regular, Consolas, monospace !important;
  tab-size: 2;
}
pre code { padding: 0 !important; background: transparent !important; color: inherit !important; }
body :not(pre) > code { padding: .13em .38em !important; border: 1px solid #e5eaf1; border-radius: 5px !important; background: #f1f4f8 !important; color: #9b3154 !important; font: .9em ui-monospace, SFMono-Regular, Consolas, monospace !important; }
img { max-width: 100%; height: auto; border-radius: 10px; }
table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; }
th, td { padding: .7rem .85rem; border: 1px solid var(--blog-line); text-align: left; }
th { background: var(--blog-wash); color: #1e385d; }
blockquote { margin: 1.5rem 0; padding: .7rem 1.2rem; border-left: 4px solid #6b9bdd; background: var(--blog-wash); color: var(--blog-muted); }
footer { margin: 2rem 0 0 !important; padding: 1rem 0 0 !important; border-top: 1px solid var(--blog-line); background: transparent !important; color: var(--blog-muted) !important; text-align: center; }
footer a { color: var(--blog-blue); }
@media (max-width: 640px) {
  body > main, body > .article-content, body > article, body > .container, body > .wrap, body > div.wrap, body > div.container, body > div#main {
    width: min(100% - 1rem, 880px) !important;
    margin: .5rem auto 2rem !important;
    padding: 1rem !important;
    border-radius: 12px;
  }
  body > header { padding: 2rem 1rem !important; }
  pre { padding: .8rem !important; font-size: .82rem !important; }
}
