/* speedrun.io — news/blog styles (article pages + list page) */
/* Extracted from news.html's former inline <style> block so it isn't
   duplicated across every generated page. Pairs with site-chrome.css. */

/* ── Background ── */

.bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center right;
    opacity: 0.25;
  }

.bg-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
      to bottom,
      rgba(13,15,14,0.40) 0%,
      rgba(13,15,14,0.10) 40%,
      rgba(13,15,14,0.60) 85%,
      rgba(13,15,14,0.90) 100%
    );
  }

/* ── Content wrapper ── */

.content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 0 clamp(24px, 5vw, 72px);
  }

/* ── Article layout ── */

.article-wrap {
    flex: 1;
    display: flex;
    padding: 56px 0 40px;
    gap: 48px;
  }

/* ── TOC sidebar ── */

.toc {
    width: 180px;
    position: fixed;
    top: 100px;
    left: clamp(24px, 5vw, 72px);
  }

.toc-label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 14px;
  }

.toc ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

.toc ol li a {
    font-size: 12px;
    font-weight: 300;
    color: var(--text-muted);
    text-decoration: none;
    line-height: 1.5;
    display: block;
    padding: 4px 0 4px 10px;
    border-left: 1px solid var(--border);
    transition: color 0.15s, border-color 0.15s;
  }

.toc ol li a:hover,
  .toc ol li a.active {
    color: var(--text-primary);
    border-left-color: var(--accent);
  }

/* ── Back-to-all link (sits above the TOC list) ── */

.toc-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 400;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 20px;
    transition: color 0.2s;
  }

.toc-back:hover {
    color: var(--accent);
  }

.toc-back svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
  }

.sitemap {
    margin-top: 48px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
  }

/* ── Article body ── */

.article {
    flex: 1;
    min-width: 0;
    max-width: 680px;
    margin-left: 256px;
  }

.article-post {
    padding-bottom: 8px;
  }

.article-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 20px;
  }

.article-eyebrow .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
  }

.article-title {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 300;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--text-primary);
    margin-bottom: 16px;
  }

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 300;
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
  }

.article-meta a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
  }

.article-meta a:hover {
    color: var(--accent);
  }

/* ── Content typography ── */

section[id],
  .article-title[id] {
    scroll-margin-top: 24px;
  }

.article-body h2 {
    font-size: 22px;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    margin: 48px 0 16px;
    scroll-margin-top: 32px;
  }

.article-body h3 {
    font-size: 17px;
    font-weight: 500;
    color: var(--text-primary);
    margin: 36px 0 12px;
  }

.article-body p {
    font-size: 15px;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 18px;
  }

.article-body p strong {
    color: var(--text-primary);
    font-weight: 500;
  }

.article-body ul {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
  }

.article-body ul li {
    font-size: 15px;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.7;
    padding-left: 18px;
    position: relative;
    margin-bottom: 8px;
  }

.article-body ul li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 12px;
    top: 2px;
  }

.article-body a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
  }

.article-body a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
  }

.article-body blockquote {
    border-left: 2px solid var(--accent);
    padding: 16px 0 16px 24px;
    margin: 32px 0;
    font-size: 16px;
    font-weight: 300;
    color: var(--text-primary);
    line-height: 1.7;
    font-style: italic;
  }

.article-body blockquote cite {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px;
    font-style: normal;
  }

.article-body code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 13px;
    background: var(--accent-dim);
    color: var(--accent);
    padding: 2px 7px;
    border-radius: 4px;
  }

.article-body hr {
    border: none;
    height: 1px;
    background: var(--border);
    margin: 48px 0;
  }

/* ── Highlight card (what's included) ── */

.feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 32px 0;
  }

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 24px;
    transition: border-color 0.2s;
  }

.feature-card:hover {
    border-color: var(--accent);
  }

.feature-card .card-icon {
    font-size: 32px;
    margin-bottom: 14px;
    color: var(--accent);
    opacity: 0.85;
  }

.feature-card h4 {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
  }

.feature-card p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0;
  }

/* ── Prev / next article nav ── */

.article-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 56px 0 8px;
  }

.article-nav a {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
    min-width: 0;
  }

.article-nav a:hover {
    border-color: var(--accent);
    background: rgba(91,141,184,0.06);
  }

.article-nav .nav-next {
    text-align: right;
    align-items: flex-end;
  }

.article-nav .nav-dir {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--text-muted);
  }

.article-nav .nav-title {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

.article-nav .nav-placeholder {
    visibility: hidden;
  }

/* ── CTA section (notify form) ── */

.cta-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 40px;
    margin: 48px 0 20px;
    text-align: center;
  }

.cta-section h3 {
    font-size: 22px;
    font-weight: 400;
    color: var(--text-primary);
    margin: 0 0 8px;
    letter-spacing: -0.01em;
  }

.cta-section .cta-sub {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 28px;
  }

.form-row {
    display: flex;
    align-items: stretch;
    gap: 0;
    max-width: 420px;
    margin: 0 auto;
  }

.notify-btn:disabled {
    opacity: 0.6;
    cursor: default;
  }

.success-msg {
    display: none;
    font-size: 13px;
    color: var(--accent-hover);
    margin-top: 14px;
  }

/* ── Footer ── */

footer {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 24px 0 32px;
    border-top: 1px solid var(--border);
  }

.footer-bottom {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    padding-bottom: 0px;
  }

/* ── Mobile TOC button ── */

.toc-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    margin-left: 8px;
  }

.toc-toggle:hover {
    color: var(--text-primary);
    border-color: var(--accent);
  }

.toc-toggle svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
  }

.toc-toggle.open svg {
    transform: rotate(90deg);
  }

.toc-mobile {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    pointer-events: none;
  }

.toc-mobile.open {
    display: block;
    pointer-events: auto;
  }

.toc-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    opacity: 0;
    transition: opacity 0.3s ease;
  }

.toc-mobile.open .toc-overlay {
    opacity: 1;
  }

.toc-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 85%;
    max-width: 320px;
    height: 100%;
    background: var(--bg);
    border-right: 1px solid var(--border);
    padding: 24px 20px;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

.toc-mobile.open .toc-panel {
    transform: translateX(0);
  }

.toc-panel .toc-label {
    margin-bottom: 20px;
  }

.toc-panel ol {
    list-style: none;
    padding: 0;
    margin: 0 0 8px;
  }

.toc-panel ol li a {
    display: block;
    padding: 10px 0 10px 14px;
    font-size: 14px;
    font-weight: 300;
    color: var(--text-muted);
    text-decoration: none;
    line-height: 1.5;
    border-left: 2px solid var(--border);
    transition: color 0.2s, border-color 0.2s, background 0.2s;
  }

.toc-panel ol li a:hover,
  .toc-panel ol li a:focus {
    color: var(--text-primary);
    border-left-color: var(--accent);
    background: rgba(91,141,184,0.08);
  }

.toc-panel ol li a.active {
    color: var(--text-primary);
    border-left-color: var(--accent);
    background: rgba(91,141,184,0.12);
    font-weight: 500;
  }

/* ── Article list page ── */

.post-list-head {
    max-width: 680px;
    margin-bottom: 40px;
  }

.post-list-title {
    font-size: clamp(28px, 3.5vw, 40px);
    font-weight: 300;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 10px;
  }

.post-list-sub {
    font-size: 14px;
    font-weight: 300;
    color: var(--text-secondary);
  }

.post-group {
    max-width: 680px;
    margin-bottom: 40px;
  }

.post-group-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
  }

.post-row {
    display: block;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    transition: opacity 0.2s;
  }

.post-row:hover {
    opacity: 0.8;
  }

.post-group .post-row:last-child {
    border-bottom: none;
  }

.post-row-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
  }

.post-row-eyebrow {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
  }

.post-row-date {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 300;
  }

.post-row-title {
    font-size: 19px;
    font-weight: 400;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    margin-bottom: 6px;
  }

.post-row-excerpt {
    font-size: 14px;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.6;
  }

/* ── Responsive ── */

@media (max-width: 768px) {
    .nav-center { display: none; }
    .toc { display: none; }

    .toc-toggle { display: flex; }

    .article { margin-left: 0; }
    .post-list-head,
    .post-group { max-width: 100%; }

    .feature-grid {
      grid-template-columns: 1fr;
    }

    .article-wrap {
      padding-top: 24px;
      gap: 0;
    }

    .article-nav {
      grid-template-columns: 1fr;
    }

    .article-nav .nav-next {
      text-align: left;
      align-items: flex-start;
    }

    .cta-section {
      padding: 32px 24px;
    }

    .form-row {
      flex-direction: column;
      gap: 10px;
      max-width: 100%;
    }

    .email-input {
      border-right: 1px solid var(--border);
      border-radius: 6px;
    }

    .notify-btn {
      border-radius: 6px;
      padding: 14px;
    }
  }

/* ── Mobile menu button ── */

@media (max-width: 768px) {
    .mob-menu-btn { display: flex; }
  }

.mob-nav {
    display: flex;
    flex-direction: column;
    padding: 12px;
    gap: 2px;
  }