/* Extracted from src/views/post.ejs. Colours use design tokens (tokens.css). */
.article-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
  }

  .article-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--line);
    animation: slideDown 0.6s ease-out;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .article-date {
    font-size: 0.8rem;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
  }

  .article-title {
    font-size: clamp(1.4rem, 3.5vw, 2.1rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    color: var(--ink);
  }

  .article-subtitle {
    font-size: 1.1rem;
    color: var(--ink-muted);
    line-height: 1.7;
    font-weight: 300;
  }

  .author-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--success-bg) 0%, var(--info-bg) 100%);
    border: 1px solid var(--success-bg);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--success);
  }

  .author-bar-text {
    font-weight: 500;
  }

  .author-bar-actions {
    display: flex;
    gap: 0.75rem;
  }

  .btn-edit,
  .btn-delete {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    border: 1.5px solid;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
  }

  .btn-edit {
    border-color: var(--line-strong);
    color: var(--ink);
    background: var(--surface);
  }

  .btn-edit:hover {
    background: var(--ink);
    color: var(--bg);
  }

  .btn-delete {
    border-color: var(--danger);
    color: var(--danger);
    background: var(--surface);
  }

  .btn-delete:hover {
    background: var(--danger);
    color: var(--bg);
  }

  .article-content {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--ink);
    margin: 3rem 0;
    overflow-wrap: break-word;
  }

  .article-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 2.5rem 0 1.25rem;
    color: var(--ink);
    letter-spacing: -0.02em;
    line-height: 1.3;
  }

  .article-content h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 2rem 0 1rem;
    color: var(--ink);
    line-height: 1.4;
  }

  .article-content p {
    margin-bottom: 1.5rem;
  }

  .article-content a {
    color: var(--ink);
    text-decoration: none;
    border-bottom: 2px solid var(--line);
    transition: border-color 0.3s ease;
  }

  .article-content a:hover {
    border-bottom-color: var(--line-strong);
  }

  .article-content blockquote {
    margin: 2rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid var(--line-strong);
    background: var(--surface-2);
    font-style: italic;
    color: var(--ink);
    border-radius: 0 8px 8px 0;
  }

  .article-content blockquote p:last-child {
    margin-bottom: 0;
  }

  .article-content code {
    background: var(--surface-2);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Geist Mono', monospace;
    font-size: 0.85em;
    color: var(--accent-text);
    border: 1px solid var(--line);
  }

  .article-content pre {
    background: var(--ink);
    color: var(--bg);
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
    border: 1px solid var(--line-strong);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  }

  .article-content pre code {
    background: none;
    padding: 0;
    color: inherit;
    border: none;
    font-size: 0.9em;
  }

  .article-content ul,
  .article-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
  }

  .article-content li {
    margin-bottom: 0.75rem;
    padding-left: 0.5rem;
  }

  .article-content ul li::marker {
    color: var(--ink-muted);
  }

  .article-content ol li::marker {
    color: var(--ink);
    font-weight: 600;
    font-family: 'Geist Mono', monospace;
    font-size: 0.9em;
  }

  .article-content hr {
    border: 0;
    height: 1px;
    background: var(--surface-2);
    margin: 3rem 2rem;
  }

  .article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.95rem;
  }

  .article-content th,
  .article-content td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--line);
    text-align: left;
  }

  .article-content th {
    background: var(--surface-2);
    font-weight: 600;
    color: var(--ink);
  }

  .article-content tr:nth-child(even) {
    background: var(--surface-2);
  }

  .article-content img {
    max-width: 100%;
    height: auto;
    margin: 2.5rem 0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: block;
  }

  .article-footer {
    padding-top: 2rem;
    border-top: 1px solid var(--line);
    margin-top: 3rem;
  }

  .back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink);
    text-decoration: none;
    transition: all 0.3s ease;
  }

  .back-link:hover {
    gap: 0.875rem;
    color: var(--ink-muted);
  }

  .back-link svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
  }

  .back-link:hover svg {
    transform: translateX(-2px);
  }

  .post-images-section {
    margin: 2.5rem 0;
    padding: 2rem 0;
  }

  .post-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
  }

  .post-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
  }

  .post-image-container:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  }

  .post-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    transition: transform 0.3s ease;
  }

  .post-image-container:hover .post-image {
    transform: scale(1.02);
  }

  @media (max-width: 768px) {
    .post-images-grid {
      grid-template-columns: 1fr;
    }
  }

/* ---- Design pass: article typography ---- */
.article-title {
  font-size: clamp(2.6rem, 6.5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.article-content {
  max-width: 68ch;
  margin-left: auto;
  margin-right: auto;
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--ink-soft);
}

.article-content > p:first-of-type::first-letter {
  float: left;
  margin: 0.2rem 0.6rem 0 0;
  font-size: 4.2rem;
  line-height: 0.85;
  font-weight: 800;
  color: var(--accent);
}

.article-content h2 {
  margin-top: 2.75rem;
  font-size: clamp(1.7rem, 3.5vw, 2.3rem);
  letter-spacing: -0.03em;
}

.article-content blockquote {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--accent);
  border-radius: 0 14px 14px 0;
  background: var(--surface);
  font-size: 1.2rem;
  font-style: normal;
  font-weight: 500;
  color: var(--ink);
}

.article-content img {
  border-radius: 16px;
}
