:root {
  --bg: #fafaf6;
  --text: #1a1d24;
  --muted: #5b6573;
  --link: #2c5be0;
  --link-2: #155c43;
  --border: #e6e1d1;
  --panel: #fff;
  --accent: #2c5be0;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; }

body {
  font-family: ui-serif, "Iowan Old Style", Georgia, "Times New Roman", serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 18px;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  background: #efeee8;
  padding: 1px 4px;
  border-radius: 4px;
  font-size: 0.9em;
}
pre {
  background: #1a1d24;
  color: #e5e5e5;
  padding: 16px;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.5;
}
pre code { background: none; padding: 0; }

blockquote {
  margin: 20px 0;
  padding: 12px 18px;
  background: #fff;
  border-left: 4px solid var(--accent);
  color: var(--muted);
}

.disclosure-banner {
  background: #f0ece0;
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  color: #3b3a35;
}
.disclosure-banner p { margin: 0; }

.disclosure-inline {
  display: inline-block;
  background: #f0ece0;
  border-radius: 4px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  color: #6b6452;
  padding: 4px 10px;
  margin-right: 6px;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.site-header .brand {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.site-header nav a {
  margin-left: 16px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumbs {
  max-width: 1200px;
  margin: 16px auto 0;
  padding: 0 32px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  color: var(--muted);
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs span { color: var(--text); font-weight: 500; }

main { padding: 24px 0 64px; }
.layout {
  display: grid;
  grid-template-columns: minmax(0, 720px) 280px;
  gap: 56px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}
main.home .layout { display: block; max-width: 760px; }
main.home .content { max-width: 720px; }
main.page .layout { display: block; max-width: 760px; }
main.page .content { max-width: 720px; }

.content { min-width: 0; }
.content article { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 32px 36px; margin-bottom: 32px; }

.content h1 {
  font-size: 38px;
  line-height: 1.2;
  margin: 0 0 8px;
}
.content h2 {
  font-size: 24px;
  margin-top: 36px;
  border-top: 1px solid var(--border);
  padding-top: 28px;
}
.content h3 { font-size: 20px; margin-top: 28px; }
.content p { margin: 16px 0; }
.content ul, .content ol { padding-left: 22px; }

.content .meta {
  color: var(--muted);
  font-size: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin-bottom: 28px;
}

.content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
}
.content th, .content td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.content th {
  background: #f0ece0;
  font-weight: 700;
}
.content td strong { font-family: inherit; }

.cta-block {
  background: #fef9e7;
  border: 1px solid #e6d8a3;
  border-radius: 8px;
  padding: 16px 20px;
  margin: 32px 0;
}

.cta-row {
  margin: 28px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.cta-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 22px;
  border-radius: 8px;
  text-decoration: none !important;
  transition: background 0.15s;
}
.cta-btn:hover { background: #1f47b8; }

.hero {
  text-align: center;
  padding: 32px 0 32px;
}
.hero h1 {
  font-size: 38px;
  line-height: 1.2;
  margin: 0 0 16px;
}
.hero p {
  color: var(--muted);
  font-size: 18px;
  margin: 0;
}

ul.posts {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 16px;
}
ul.posts li {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
}
ul.posts li a strong {
  font-size: 18px;
  color: var(--text);
}
ul.posts li p {
  margin: 6px 0 8px;
  color: var(--muted);
  font-size: 14px;
}
.tag {
  display: inline-block;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--link-2);
  background: #e7f0e3;
  padding: 2px 8px;
  border-radius: 999px;
  margin-right: 6px;
}
.cat {
  display: inline-block;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--link);
  background: #e3eaf8;
  padding: 2px 8px;
  border-radius: 999px;
}

.cta {
  margin-top: 40px;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: center;
}
.cta h2 { margin: 0 0 12px; font-size: 24px; }
.cta-link {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 600;
  font-size: 16px;
}

.newsletter {
  margin-top: 40px;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.newsletter h2 { margin: 0 0 8px; font-size: 20px; }
.newsletter p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.newsletter-form {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.newsletter-form input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
}
.newsletter-form button {
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.muted { color: var(--muted); font-size: 12px; }

.related {
  margin-top: 32px;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.related h2 { font-size: 18px; margin: 0 0 12px; }
.related ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.related li a { font-size: 15px; }

.toc {
  position: sticky;
  top: 24px;
  align-self: start;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  border-left: 1px solid var(--border);
  padding-left: 16px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}
.toc-title {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 8px;
}
.toc nav ul { list-style: none; padding: 0; margin: 0; }
.toc nav li { margin: 4px 0; }
.toc nav li.h3 { padding-left: 12px; }
.toc nav a { color: var(--muted); display: block; padding: 4px 0; line-height: 1.4; }
.toc nav a:hover { color: var(--accent); text-decoration: none; }

.site-footer {
  text-align: center;
  padding: 32px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
}
.site-footer p { margin: 4px 0; }
.site-footer a { color: var(--muted); }

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .toc {
    position: static;
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--border);
    padding-top: 16px;
  }
  .content article { padding: 24px 22px; }
  .content h1 { font-size: 30px; }
}

@media print {
  .site-header, .site-footer, .disclosure-banner, .toc, .newsletter, .related, .cta { display: none; }
  .content article { border: none; padding: 0; }
  .layout { display: block; max-width: 720px; }
  body { font-size: 14px; color: #000; background: #fff; }
}
