.blog-post {
  padding: 1rem 0;
}

.post-header {
  padding: 1rem;
  border: 1px dotted var(--rule);
  border-radius: 4px;
  background: var(--card);
  margin-bottom: .75rem;
}

.post-header h1 {
  margin: 0 0 .25rem;
  font-size: 1.6rem;
  letter-spacing: -.01em;
}

.post-meta {
  color: var(--description);
  font-size: .85em;
  margin: 0;
}

/* Sections*/
.block {
  padding: 1.25rem 1rem;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 4px;
}

.block h2 {
  margin: 0 0 .75rem;
  font-size: 1.15rem;
  border-bottom: 1px dotted var(--rule);
  padding-bottom: .35rem;
}

.block h3 {
  margin: 1.25rem 0 .5rem;
  font-size: .95rem;
  color: var(--ink);
  opacity: .9;
}

/* markdown-style prefix */
.block h3::before {
  content: "# ";
  color: var(--description);
  font-weight: normal;
}

/* Code blocks */
.code-block {
  background: var(--code-bg);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 1rem;
  overflow-x: auto;
  font-size: .82em;
  line-height: 1.45;
  margin: .75rem 0 1.25rem;
}

.service-tags {
  margin-bottom: 1rem;
}

.todo {
  font-family: inherit;
  color: var(--accent);
}

/* Inline code mit background */
code {
  background: var(--code-bg);
  padding: .15rem .35rem;
  border-radius: 2px;
  font-size: .88em;
}

.list {
  margin: .5rem 0;
  padding-left: 1.25rem;
}

.list li {
  margin: .4rem 0;
  line-height: 1.4;
}

table.list {
  width: 100%;
  border-collapse: collapse;
  font-size: .9em;
  margin-top: .5rem;
  padding-left: 0;
}

table.list th,
table.list td {
  border: 1px solid var(--rule);
  padding: .5rem .6rem;
  text-align: left;
  vertical-align: top;
}

table.list th {
  background: var(--surface);
  font-weight: 600;
}

.meta {
  color: var(--description);
  font-size: .88em;
}

p.meta {
  margin-top: .5rem;
  font-style: italic;
}

/* Blocklist links */
.list a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted var(--description);
}

.list a:hover {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

hr {
  margin: 1.75rem 0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --code-bg: #1a1b1e;
  }
  
  .code-block {
    background: var(--code-bg);
    border-color: var(--rule);
  }
  
  code {
    background: var(--code-bg);
  }
}

/* Explainer boxes */
.explainer {
  margin: 1rem 0;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--surface);
}

.explainer summary {
  padding: .6rem .75rem;
  cursor: pointer;
  font-weight: 500;
  color: var(--accent);
  list-style: none;
}

.explainer summary::-webkit-details-marker {
  display: none;
}

.explainer summary::before {
  content: "› ";
  font-size: .85em;
  margin-right: .25rem;
  display: inline-block;
  transition: transform .12s ease;
}

.explainer[open] summary::before {
  transform: rotate(90deg);
}

.explainer summary:hover {
  opacity: .8;
}

.explainer-content {
  padding: .5rem .75rem .75rem;
  border-top: 1px dotted var(--rule);
}

.explainer-content p:first-child {
  margin-top: .25rem;
}

.explainer-content ul {
  margin: .5rem 0;
  padding-left: 1.25rem;
}

.explainer-content li {
  margin: .35rem 0;
}

/* Deep dive links */
.deep-dive {
  font-size: .85em;
  margin-left: .5rem;
}

/* Coming soon Platzhalter */
.coming-soon {
  color: var(--description);
  font-style: italic;
}

/* Smooth scroll */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
/* Tablet */
@media (max-width: 768px) {
  .code-block {
    font-size: .78em;
    padding: .85rem;
    margin: .5rem -.5rem 1rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  
  .block {
    padding: 1rem .85rem;
  }
  
  .post-header {
    padding: .85rem;
  }
}

/* Mobile */
@media (max-width: 600px) {
  .code-block {
    font-size: .72em;
    padding: .65rem;
    line-height: 1.35;
  }
  
  .block {
    padding: .85rem .65rem;
    border-radius: 2px;
  }
  
  .block h2 {
    font-size: 1.05rem;
    padding-bottom: .25rem;
  }
  
  .block h3 {
    font-size: .88rem;
    margin: 1rem 0 .4rem;
  }
  
  .post-header {
    padding: .75rem;
  }
  
  .post-header h1 {
    font-size: 1.35rem;
  }
  
  .explainer summary {
    padding: .5rem .6rem;
    font-size: .9em;
  }
  
  .explainer-content {
    padding: .4rem .6rem .6rem;
    font-size: .9em;
  }
  
  table.list {
    font-size: .8em;
  }
  
  table.list th,
  table.list td {
    padding: .35rem .4rem;
  }
}

/* Small phones */
@media (max-width: 400px) {
  .code-block {
    font-size: .68em;
    padding: .5rem;
  }
  
  .post-header h1 {
    font-size: 1.2rem;
  }
  
  .block h2 {
    font-size: 1rem;
  }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  .explainer {
    background: var(--surface);
  }
  
  .block h3 {
    opacity: .95;
  }
}
