@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --blue: #2563eb;
  --blue-dark: #1e40af;
  --ink: #0f172a;
  --text: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --soft: #f8fafc;
  --footer: #111827;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: Inter, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { font: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid #93c5fd; outline-offset: 4px; }

.preview-note {
  padding: 6px 16px;
  background: #eff6ff;
  color: #475569;
  border-bottom: 1px solid #dbeafe;
  text-align: center;
  font-size: 12px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 3px 12px rgba(15,23,42,.07);
  backdrop-filter: blur(12px);
}
.site-header__inner {
  max-width: 1370px;
  min-height: 80px;
  margin: auto;
  padding: 0 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.site-logo { display: flex; align-items: center; }
.site-logo img { width: 86px; height: auto; display: block; }
.site-nav { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.site-nav a { color: #1f2937; transition: color .2s; }
.site-nav a:hover, .site-nav a.active { color: var(--blue); }
.nav-divider { width: 1px; height: 24px; background: var(--line); }
.site-nav .signup {
  padding: 10px 18px;
  border-radius: 8px;
  color: white;
  background: var(--blue);
  font-weight: 600;
}
.site-nav .signup:hover { color: white; background: var(--blue-dark); }
.mobile-menu { display: none; border: 0; background: transparent; font-size: 24px; }

.loading { min-height: 60vh; display: grid; place-items: center; color: var(--muted); }
.container { width: min(1100px, calc(100% - 40px)); margin: auto; }

.blog-hero {
  position: relative;
  overflow: hidden;
  padding: 34px 0 30px;
  background: linear-gradient(145deg,#eff6ff 0%,#fff 58%,#eef2ff 100%);
  border-bottom: 1px solid #dbeafe;
}
.blog-hero::before {
  content: "";
  position: absolute;
  width: 460px;
  height: 460px;
  right: -180px;
  top: -230px;
  border-radius: 999px;
  background: rgba(37,99,235,.1);
}
.eyebrow { margin: 0 0 10px; color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.blog-hero h1 { margin: 0; max-width: 620px; font-size: clamp(30px,3.6vw,40px); line-height: 1.15; letter-spacing: -.03em; }
.blog-hero p:last-child { max-width: 590px; margin: 13px 0 0; color: var(--muted); font-size: 16px; }

.published { padding: 32px 0 64px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.section-heading h2 { margin: 0; font-size: 27px; letter-spacing: -.025em; }
.section-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.post-card {
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0,1.16fr) minmax(340px,.84fr);
  min-height: 395px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 16px 45px rgba(15,23,42,.08);
}
.post-card + .post-card { margin-top: 24px; }
.post-card__image { min-height: 395px; background: #e0e7ff; }
.post-card__image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card__copy { padding: 42px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.category { display: inline-flex; padding: 5px 10px; border-radius: 999px; background: #dbeafe; color: #1d4ed8; font-size: 12px; font-weight: 700; }
.post-card h2 { margin: 17px 0 15px; font-size: clamp(26px,3vw,36px); line-height: 1.22; letter-spacing: -.035em; }
.post-card__excerpt { margin: 0; color: var(--text); }
.meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 24px 0 0; color: var(--muted); font-size: 13px; }
.avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--blue); color: white; font-weight: 700; }
.read-link { margin-top: 23px; color: var(--blue); font-weight: 700; }

.breadcrumb { padding: 22px 0 0; color: var(--muted); font-size: 13px; }
.breadcrumb a { color: var(--blue); }
.article-head { max-width: 760px; margin: 24px auto 24px; text-align: center; }
.article-head h1 { margin: 13px 0 15px; font-size: clamp(32px,4vw,42px); line-height: 1.18; letter-spacing: -.03em; }
.article-head .meta { justify-content: center; }
.article-cover { max-width: 900px; margin: 0 auto 38px; overflow: hidden; border-radius: 14px; box-shadow: 0 14px 42px rgba(15,23,42,.1); }
.article-cover img { width: 100%; display: block; }
.article-layout { display: grid; grid-template-columns: 220px minmax(0,740px); justify-content: center; gap: 56px; padding-bottom: 80px; }
.toc { align-self: start; position: sticky; top: 110px; padding-left: 18px; border-left: 2px solid var(--line); }
.toc strong { display: block; margin-bottom: 15px; font-size: 12px; letter-spacing: .12em; }
.toc a { display: block; margin: 11px 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.toc a:hover { color: var(--blue); }
.article-body { min-width: 0; }
.article-body h2 { margin: 43px 0 15px; color: var(--ink); font-size: 30px; line-height: 1.25; letter-spacing: -.025em; scroll-margin-top: 110px; }
.article-body h2:first-child { margin-top: 0; }
.article-body h3 { margin: 31px 0 12px; font-size: 22px; line-height: 1.35; }
.article-body p, .article-body li { color: var(--text); font-size: 17px; line-height: 1.85; }
.article-body li { margin: 8px 0; }
.article-body blockquote { margin: 28px 0; padding: 20px 23px; border-left: 4px solid #f59e0b; border-radius: 0 10px 10px 0; background: #fffbeb; }
.article-body blockquote p { margin: 0; color: #78350f; font-size: 15px; }
.article-body img { display: block; width: 100%; height: auto; margin: 24px auto; border-radius: 12px; }
.article-body a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.article-body hr { margin: 35px 0; border: 0; border-top: 1px solid var(--line); }
.article-body table { width: 100% !important; height: auto !important; margin: 25px 0; border: 1px solid var(--line) !important; border-collapse: collapse; background: white !important; font-size: 14px; }
.article-body th, .article-body td { width: auto !important; height: auto !important; padding: 13px 11px !important; border: 1px solid var(--line) !important; color: var(--text) !important; text-align: left !important; }
.article-body th { background: #eff6ff !important; color: var(--ink) !important; }
.article-body th span { color: var(--ink) !important; }
.table-scroll { overflow-x: auto; }
.article-cta { margin-top: 40px; padding: 28px; border-radius: 14px; background: linear-gradient(135deg,#1d4ed8,#2563eb); color: white; }
.article-cta h2 { margin: 0 0 8px; color: white; font-size: 25px; }
.article-cta p { margin: 0 0 18px; color: rgba(255,255,255,.82); font-size: 15px; }
.article-cta a { display: inline-flex; padding: 11px 18px; border-radius: 7px; background: white; color: #1d4ed8; font-weight: 700; text-decoration: none; }

.site-footer { padding: 64px max(28px,calc((100% - 1110px)/2)) 26px; background: var(--footer); color: white; }
.footer-grid { display: grid; grid-template-columns: 1.25fr repeat(3,1fr); gap: 70px; }
.footer-brand img { width: 116px; height: auto; filter: brightness(0) invert(1); }
.footer-brand p { max-width: 260px; margin: 22px 0 0; color: #9ca3af; line-height: 1.65; }
.site-footer h2 { margin: 0 0 20px; font-size: 17px; }
.site-footer a { display: block; margin: 10px 0; color: #9ca3af; font-size: 14px; transition: color .2s; }
.site-footer a:hover { color: #60a5fa; }
.socials { display: flex; gap: 16px; margin-top: 17px; }
.socials a { margin: 0; font-size: 22px; }
.footer-bottom { margin-top: 64px; padding-top: 27px; border-top: 1px solid #273246; color: #9ca3af; font-size: 13px; }
.error { min-height: 55vh; display: grid; place-items: center; padding: 30px; color: #b91c1c; text-align: center; }

@media (max-width: 820px) {
  .site-header__inner { min-height: 70px; padding: 0 20px; }
  .mobile-menu { display: block; }
  .site-nav { display: none; position: absolute; top: 70px; left: 0; right: 0; padding: 18px 22px; background: white; border-top: 1px solid var(--line); box-shadow: 0 12px 25px rgba(15,23,42,.1); flex-direction: column; align-items: stretch; gap: 4px; }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 9px 4px; }
  .nav-divider { display: none; }
  .site-nav .signup { text-align: center; margin-top: 4px; }
  .blog-hero { padding: 30px 0 27px; }
  .post-card { grid-template-columns: 1fr; }
  .post-card__image { min-height: 0; }
  .post-card__copy { padding: 28px; }
  .article-layout { display: block; }
  .toc { position: static; margin-bottom: 35px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 45px 30px; }
}

@media (max-width: 540px) {
  .container { width: min(100% - 30px,1100px); }
  .blog-hero h1 { font-size: 29px; }
  .blog-hero p:last-child { font-size: 15px; }
  .published { padding-top: 30px; }
  .section-heading { display: block; }
  .section-heading p { margin-top: 6px; }
  .post-card__copy { padding: 23px; }
  .post-card h2 { font-size: 26px; }
  .article-head { margin-top: 21px; margin-bottom: 22px; }
  .article-head h1 { font-size: 29px; }
  .article-cover { margin-bottom: 30px; }
  .article-layout { padding-bottom: 55px; }
  .article-body p, .article-body li { font-size: 16px; }
  .article-body h2 { font-size: 26px; }
  .footer-grid { grid-template-columns: 1fr; gap: 35px; }
  .footer-bottom { margin-top: 40px; }
  .site-footer { padding-top: 48px; }
}

/* Shared public-site geometry, verified against mrsms.io/about. */
.site-header, .site-footer { font-family: ui-sans-serif, system-ui, sans-serif; line-height: 1.5; }
.site-header { background: #fff; box-shadow: 0 1px 3px #00000012; }
.site-header__inner { max-width: none; padding: 0 32px; height: 80px; }
.site-logo img { height: 96px; width: auto; }
.site-nav { gap: 16px; font-size: 16px; }
.site-footer { padding: 64px max(32px, calc((100% - 1216px)/2)); }
.footer-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 32px; }
.footer-brand img { width: auto; height: 128px; }
.footer-brand p { margin: 24px 0; font-size: 16px; line-height: 1.625; }
.site-footer h2 { font-size: 18px; font-weight: 600; margin-bottom: 24px; }
.site-footer a { font-size: 16px; margin: 12px 0; }
.socials { gap: 16px; margin-top: 16px; }
.socials a { margin: 0; }
.socials svg { width: 20px; height: 20px; }
.footer-bottom { margin-top: 48px; padding-top: 32px; font-size: 14px; border-color: #1f2937; }
.article-cover img { height: auto; }
.post-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; margin-top:24px; }
.post-grid:empty { display:none; }
.post-grid .post-card { display:flex; flex-direction:column; margin:0; min-height:0; }
.post-grid .post-card__image { min-height:0; aspect-ratio:800/439; }
.post-grid .post-card__copy { padding:24px; }
.post-grid .post-card h2 { font-size:22px; }
.post-grid .post-card__excerpt { display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.pagination { display:flex; justify-content:center; gap:12px; margin-top:32px; }
.pagination a { padding:8px 16px; border:1px solid var(--line); border-radius:6px; }
.pagination [aria-current] { background:var(--blue); color:white; }
@media(max-width:820px) {
 .site-header__inner { height:80px; padding:0 24px; }
 .site-logo img { height:64px; }
 .site-nav { top:80px; }
 .post-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:767px) {
 .site-footer { padding:64px 24px; }
 .footer-grid { grid-template-columns:1fr; gap:32px; }
 .footer-bottom { text-align:center; }
}
@media(max-width:540px) { .post-grid { grid-template-columns:1fr; } }
@media(prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } }

.post-card__image { display:flex; align-items:center; background:#eff6ff; }
.post-card__image img { object-fit:contain; height:auto; }
.theme-toggle { border:0; background:transparent; color:inherit; cursor:pointer; width:40px; height:40px; font-size:24px; }
.dark { --ink:#f1f5f9; --text:#cbd5e1; --muted:#94a3b8; --line:#334155; --soft:#1e293b; color-scheme:dark; }
.dark body,.dark .site-header,.dark .site-nav { background:#111827; }
.dark .site-nav a { color:#e5e7eb; }
.dark .blog-hero { background:linear-gradient(145deg,#172554,#111827); border-color:#334155; }
.dark .post-card { background:#1e293b; }
.dark .post-card__image { background:#172554; }
.dark .article-body table { background:#1e293b!important; }
.dark .article-body th { background:#172554!important; }
/* Match the main site's 40px theme control and 20px outline icons. */
.theme-toggle { display:inline-flex; flex-shrink:0; align-items:center; justify-content:center; padding:0; border-radius:6px; color:#374151; transition:background-color .2s,color .2s; }
.theme-toggle svg { display:block; width:20px; height:20px; }
.theme-toggle:hover { background:#f1f5f9; }
.dark .theme-toggle { color:#d1d5db; }
.dark .theme-toggle:hover { background:#1f2937; }
.site-header__inner { min-height:80px; }
.site-nav a { font-weight:400; }
.site-nav .signup { font-weight:600; }
.dark .site-nav a:hover,.dark .site-nav a.active { color:#60a5fa; }
.dark .category { background:#1e3a8a; color:#dbeafe; }
.dark .article-cta h2 { color:white; }
.dark .article-cta p { color:#dbeafe; }
