body {
  max-width: 700px;
  margin: 40px auto;
  padding: 0 16px;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  color: #000;
  background: #fff;
}

a {
  color: #00e;
}

figure.me {
  margin: 0 auto 32px;
  width: 200px;
  text-align: center;
}

figure.me .photo {
  width: 200px;
  height: 200px;
  margin: 0 auto;
  overflow: hidden;
}

figure.me img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 47% 22%;
  transform: scale(1.5);
  display: block;
}

figure.me figcaption {
  font-size: 13px;
  color: #555;
  line-height: 1.4;
  margin-top: 8px;
}

.site-title {
  text-align: center;
  font-size: 1.5em;
  font-weight: 600;
  margin: 0 0 16px;
}

hr {
  border: none;
  border-top: 1px solid #ddd;
  margin: 0 0 24px;
}

ul.posts {
  list-style: none;
  padding: 0;
}

ul.posts li {
  margin-bottom: 6px;
}

ul.posts .date {
  color: #555;
  font-variant-numeric: tabular-nums;
  margin-right: 12px;
}

article h1 {
  font-size: 1.6em;
  margin-bottom: 4px;
}

article .meta {
  color: #555;
  margin-top: 0;
  font-size: 14px;
}

article .dek {
  font-size: 1.08em;
  color: #555;
  line-height: 1.5;
  margin: 2px 0 12px;
}

article h2 a.anchor,
article h3 a.anchor {
  opacity: 0;
  margin-left: 8px;
  font-weight: 400;
  color: #bbb;
  text-decoration: none;
}

article h2:hover a.anchor,
article h3:hover a.anchor {
  opacity: 1;
}

article .fignum {
  font-weight: 600;
  color: #111;
}

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid #ddd;
}

.post-nav .next {
  margin-left: auto;
  text-align: right;
}

.back {
  display: block;
  text-align: center;
  margin-top: 24px;
  color: #555;
}

article h2 {
  font-size: 1.2em;
  font-weight: 600;
  margin-top: 40px;
  margin-bottom: 8px;
}

article h3 {
  font-size: 1.02em;
  font-weight: 600;
  margin-top: 28px;
  margin-bottom: 4px;
}

article code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85em;
  background: #f4f4f4;
  padding: 1px 5px;
  border-radius: 3px;
}

article blockquote {
  margin: 20px 0;
  padding: 4px 18px;
  border-left: 3px solid #ddd;
  color: #444;
}

article pre {
  background: #f4f4f4;
  border-radius: 6px;
  padding: 12px 14px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.5;
}

article pre code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  background: none;
  padding: 0;
  font-size: inherit;
}

.model-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 6px;
}

.model-badges .label {
  font-size: 13px;
  color: #666;
  margin-right: 2px;
}

.model-badges .badge {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #e3e3e3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.model-badges .badge img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
}

article figcaption {
  font-size: 13px;
  color: #555;
  line-height: 1.4;
  margin-top: 8px;
  text-align: center;
}

article figure {
  margin: 28px 0;
}

.hero {
  margin: 6px 0 26px;
}

.hero img {
  width: 100%;
  height: auto;
  display: block;
}

.diagram svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Sidenotes — float into the right gutter on wide screens, inline otherwise */
.sidenote {
  float: right;
  clear: right;
  width: 190px;
  margin: 4px -214px 14px 0;
  font-size: 13px;
  line-height: 1.45;
  color: #666;
  border-left: 2px solid #ddd;
  padding-left: 12px;
}

@media (max-width: 1180px) {
  .sidenote {
    float: none;
    width: auto;
    margin: 14px 0;
  }
}

/* External links — marker + hover preview */
a.ext {
  position: relative;
  white-space: nowrap;
}

a.ext::after {
  content: "\2197";
  font-size: 0.8em;
  margin-left: 1px;
  color: #888;
}

a.ext::before {
  content: attr(data-preview);
  position: absolute;
  left: 0;
  top: 1.6em;
  width: 240px;
  white-space: normal;
  background: #111;
  color: #fff;
  font-size: 12px;
  line-height: 1.4;
  padding: 8px 10px;
  border-radius: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.12s, transform 0.12s;
  pointer-events: none;
  z-index: 40;
}

a.ext:hover::before {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

article .refs {
  font-size: 14px;
  color: #444;
  line-height: 1.5;
}

article .refs li {
  margin-bottom: 4px;
}

/* Slack alert mock — mirrors a real bot message in the visitors channel */
.slack-card {
  border: 1px solid #e3e3e3;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.45;
  color: #1d1c1d;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.slack-msg {
  display: flex;
  gap: 10px;
}

.slack-avatar {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #eaeaea;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slack-avatar svg {
  width: 100%;
  height: 100%;
  display: block;
}

.slack-main {
  flex: 1 1 auto;
  min-width: 0;
}

.slack-metarow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.slack-metarow .app {
  font-weight: 700;
  color: #1d1c1d;
}

.slack-metarow .badge {
  background: #e8e8e8;
  color: #616061;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 1px 5px;
  border-radius: 3px;
}

.slack-metarow .time {
  color: #616061;
  font-size: 12px;
}

.slack-visit {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

.slack-visit .logo {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  background: #f4f4f4;
  border: 1px solid #ececec;
}

.slack-visit .who .name {
  font-weight: 700;
  color: #1264a3;
  text-decoration: none;
}

.slack-visit .who .co {
  color: #616061;
  font-size: 13px;
}

.slack-visit .who .co a {
  color: #1264a3;
  text-decoration: none;
}

.slack-card .recurrence {
  font-weight: 700;
  color: #1d1c1d;
  margin: 8px 0 2px;
}

.slack-card .pages {
  color: #616061;
  font-style: italic;
  font-size: 13px;
  margin: 4px 0;
}

.slack-card .pages a {
  color: #1264a3;
}

.slack-card .btn {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 12px;
  border: 1px solid #c4c4c4;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #1d1c1d;
  text-decoration: none;
}
