/*
 * article.css — blog-only styles: index (card grid) + single article.
 *
 * Chrome (root tokens, reset, masthead, footer) below is copied VERBATIM from the
 * canonical redesigned pages (security.css masthead + legal.css site-footer) so the
 * blog header/footer render identically to the rest of the site. Do NOT re-style the
 * masthead/footer here with bespoke values — bespoke chrome made the blog drift
 * (black CTA pill, oversized footer, wrong header rule) and was reverted 2026-05-31.
 * Only the blog-specific sections (.blog-* / .article-*) are unique to this file.
 */

  :root {
    --paper: #f6f4ef;
    --paper-warm: #efece4;
    --ink: #18181a;
    --ink-soft: #4a4a4f;
    --ink-mute: #8a8a90;
    --rule: rgba(24,24,26,0.14);
    --rule-strong: rgba(24,24,26,0.4);
    --gold: #C9911A;
    --gold-bright: #FFC105;
    --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
  }
  * { box-sizing: border-box; }
  html, body { margin: 0; padding: 0; scroll-behavior: smooth; }
  body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--paper); color: var(--ink);
    -webkit-font-smoothing: antialiased; line-height: 1.55;
    font-feature-settings: "ss01" 1, "cv11" 1;
  }
  h1, h2, h3, h4 { font-family: 'Space Grotesk', sans-serif; font-weight: 700; margin: 0; letter-spacing: -0.025em; }
  a { color: inherit; text-decoration: none; }
  .mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

  /* ============ Masthead (verbatim from security.css / legal.css) ============ */
  .masthead {
    border-bottom: 1px solid var(--ink);
    padding: 14px 32px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 24px;
  }
  .masthead .brand {
    display: flex; align-items: center; gap: 10px;
    font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 20px;
    letter-spacing: -0.02em; white-space: nowrap;
  }
  .masthead .brand .brand-mark {
    width: 30px; height: 30px; border-radius: 7px; background: var(--ink);
    display: inline-flex; align-items: center; justify-content: center;
    font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 18px;
    letter-spacing: -0.06em; line-height: 1; flex-shrink: 0;
  }
  .masthead .brand .brand-mark .t { color: var(--paper); }
  .masthead .brand .brand-mark .bang { color: var(--gold-bright); }
  .masthead .brand .accent { color: var(--gold); }
  .masthead .brand .wordmark { display: inline; }
  .masthead .right { display: flex; align-items: center; gap: 22px; font-size: 13px; }
  .masthead .right a { color: var(--ink-soft); }
  .masthead .right a:hover { color: var(--ink); }
  .masthead .right .cta { color: var(--ink); border-bottom: 2px solid var(--gold-bright); padding-bottom: 1px; font-weight: 600; }

  /* Language switcher */
  .masthead .right .lang {
    position: relative;
    font-family: 'Space Grotesk', sans-serif;
    margin-right: -6px;
  }
  .masthead .right .lang-trigger {
    background: none; border: none; padding: 4px 8px;
    font: inherit; font-size: 13px; font-weight: 500;
    color: var(--ink-soft); cursor: pointer;
    display: inline-flex; align-items: center; gap: 4px;
    letter-spacing: 0.04em;
  }
  .masthead .right .lang-trigger:hover { color: var(--ink); }
  .masthead .right .lang-trigger .chev {
    font-size: 9px; line-height: 1; transition: transform 0.2s; opacity: 0.7;
  }
  .masthead .right .lang:hover .lang-trigger .chev,
  .masthead .right .lang:focus-within .lang-trigger .chev { transform: rotate(180deg); }
  .masthead .right .lang-menu {
    position: absolute; top: calc(100% + 4px); right: 0;
    background: var(--paper); border: 1px solid var(--ink);
    min-width: 140px;
    display: none; flex-direction: column;
    box-shadow: 0 8px 24px -10px rgba(24,24,26,0.2);
    z-index: 50;
  }
  .masthead .right .lang:hover .lang-menu,
  .masthead .right .lang:focus-within .lang-menu { display: flex; }
  .masthead .right .lang-menu a {
    padding: 8px 12px; font-size: 13px; color: var(--ink-soft);
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    border-bottom: 1px solid var(--rule);
  }
  .masthead .right .lang-menu a:last-child { border-bottom: none; }
  .masthead .right .lang-menu a:hover { color: var(--ink); background: var(--paper-warm); }
  .masthead .right .lang-menu a.active { color: var(--ink); background: var(--paper-warm); font-weight: 600; }
  .masthead .right .lang-menu a .code {
    font-family: 'JetBrains Mono', monospace; font-size: 10px;
    color: var(--ink-mute); letter-spacing: 0.08em;
  }
  .masthead .right .lang-menu a.active .code { color: var(--gold); }

  @media (max-width: 720px) { .masthead .right a:not(.cta) { display: none; } }

  /* ============ Footer (verbatim from legal.css site-footer) ============ */
  footer.site-footer { border-top: 1px solid var(--ink); padding: 24px 32px; }
  .footer-inner {
    max-width: 1280px; margin: 0 auto;
    display: flex; flex-direction: column; gap: 14px;
    font-family: 'JetBrains Mono', monospace; font-size: 11px;
    text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft);
  }
  .footer-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 18px 24px; flex-wrap: wrap;
  }
  .footer-inner a:hover { color: var(--ink); }
  .footer-inner .grants { display: inline-flex; align-items: center; gap: 8px; }
  .footer-inner .grants a { display: inline-flex; align-items: center; }
  .footer-inner .grants img { display: block; height: 18px; width: auto; opacity: 0.7; transition: opacity 0.2s; }
  .footer-inner .grants a:hover img { opacity: 1; }
  .footer-inner .powered { display: inline-flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
  /* Row 2 — legal + nav */
  .footer-inner .links { display: flex; gap: 24px; flex-wrap: wrap; }

  /* ============================================================
     BLOG INDEX — hero + card grid  (blog-specific)
     ============================================================ */
  .blog-hero {
    max-width: 1100px; margin: 0 auto; padding: 64px 40px 24px;
  }
  .blog-hero .eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--gold); margin-bottom: 14px;
  }
  .blog-hero h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 40px; font-weight: 700; letter-spacing: -1px;
    line-height: 1.1; margin: 0 0 12px;
  }
  .blog-hero p { color: var(--ink-soft); font-size: 17px; max-width: 620px; margin: 0; }

  .blog-grid {
    width: calc(100% - 80px); max-width: 1100px; margin: 32px auto 96px; padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 0;
    border-top: 1px solid var(--ink);
    border-left: 1px solid var(--rule);
  }
  .blog-card {
    display: flex; flex-direction: column;
    border-right: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    background: var(--paper);
    text-decoration: none; color: inherit;
    transition: background 0.2s;
  }
  .blog-card:hover { background: rgba(255,193,5,0.05); }
  /* Typographic cover panel — the site uses no editorial photography, so the
     "cover" is built from the article's category + title on a warm paper panel
     with the same hairline grid language as the related/feature cells. */
  .blog-card-cover {
    aspect-ratio: 16 / 10;
    background: var(--paper-warm);
    border-bottom: 1px solid var(--rule);
    padding: 24px;
    display: flex; flex-direction: column; justify-content: space-between; gap: 14px;
    position: relative; overflow: hidden;
  }
  .blog-card-cover::after {
    content: ""; position: absolute; left: 22px; bottom: 0;
    width: 44px; height: 3px; background: var(--gold);
  }
  .blog-card-cover .cov-kicker {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--gold);
  }
  .blog-card-cover .cov-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 22px; font-weight: 700; line-height: 1.18; letter-spacing: -0.02em;
    color: var(--ink); margin: 0;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  }
  /* Optional real raster cover (if an article ever supplies one). */
  .blog-card .cover {
    aspect-ratio: 16 / 10; width: 100%; height: auto; object-fit: cover;
    background: var(--paper-warm); display: block; border-bottom: 1px solid var(--rule);
  }
  .blog-card-body { padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
  .blog-card-body::after {
    content: "→";
    margin-top: auto;
    padding-top: 8px;
    font-size: 18px;
    color: var(--ink-mute);
    transition: color 0.2s, transform 0.2s var(--ease-spring);
  }
  .blog-card:hover .blog-card-body::after { color: var(--gold); transform: translateX(4px); }
  /* Category + title live in the cover panel; the body carries date + excerpt. */
  .blog-card .date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px; letter-spacing: 0.04em; color: var(--ink-mute);
  }
  .blog-card .excerpt { color: var(--ink-soft); font-size: 14px; line-height: 1.6; margin: 0; }
  .blog-empty {
    max-width: 1100px; margin: 0 auto; padding: 24px 40px 120px;
    color: var(--ink-mute); font-size: 16px;
  }

  /* ============================================================
     SINGLE ARTICLE — wrap + hero band  (blog-specific)
     ============================================================ */
  .article-wrap { max-width: 760px; margin: 0 auto; padding: 0 40px 96px; }
  /* Full-width editorial header band (mirrors the SEO pages' .page-hero):
     warm paper gradient, bottom ink rule, breadcrumb + // kicker + H1 + date.
     No cover image — the site is typographic. */
  .article-hero {
    background: linear-gradient(150deg, var(--paper-warm) 0%, #ece8df 100%);
    border-bottom: 1px solid var(--ink);
    padding: 40px 0 34px;
    margin: 0 0 44px;
  }
  .article-hero-inner { max-width: 760px; margin: 0 auto; padding: 0 40px; }
  .article-hero .breadcrumb { font-size: 13px; color: var(--ink-mute); margin-bottom: 22px; }
  .article-hero .breadcrumb a { color: var(--ink-soft); text-decoration: none; }
  .article-hero .breadcrumb a:hover { color: var(--ink); }
  .article-hero .breadcrumb .sep { margin: 0 8px; opacity: 0.5; }
  .article-hero .article-kicker {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--gold);
  }
  .article-hero h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(30px, 5vw, 44px); font-weight: 700; letter-spacing: -0.03em;
    line-height: 1.08; margin: 12px 0 14px; max-width: 20ch;
  }
  .article-hero time {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px; letter-spacing: 0.04em; color: var(--ink-mute);
  }

  /* ============================================================
     .article-content — long-form prose typography
     ============================================================ */
  .article-content { font-size: 17px; }
  /* Lead: the opening paragraph reads larger, like the SEO pages' intro. */
  .article-content > p:first-of-type { font-size: 19px; line-height: 1.7; color: var(--ink); }
  .article-content h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 28px; font-weight: 700; letter-spacing: -0.02em;
    line-height: 1.22; margin: 48px 0 16px;
  }
  .article-content h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 20px; font-weight: 600; line-height: 1.35; margin: 32px 0 12px;
  }
  .article-content p { color: var(--ink-soft); line-height: 1.75; margin: 0 0 20px; }
  .article-content ul, .article-content ol { color: var(--ink-soft); margin: 0 0 20px; padding-left: 26px; }
  .article-content ul { list-style-type: disc; }
  .article-content ol { list-style-type: decimal; }
  .article-content li { margin-bottom: 8px; line-height: 1.7; }
  .article-content a { color: var(--gold); text-decoration: underline; text-underline-offset: 2px; }
  .article-content a:hover { color: var(--ink); }
  .article-content strong { color: var(--ink); font-weight: 600; }
  .article-content blockquote {
    border-left: 4px solid var(--gold); padding-left: 18px;
    margin: 28px 0; color: var(--ink-soft); font-style: italic;
  }
  .article-content table { width: 100%; border-collapse: collapse; margin: 28px 0; font-size: 15px; }
  .article-content th, .article-content td { border: 1px solid var(--rule); padding: 10px 14px; text-align: left; }
  .article-content th { background: var(--paper-warm); font-weight: 600; color: var(--ink); }
  .article-content img { max-width: 100%; height: auto; border-radius: 10px; }

  /* FAQ accordion inside an article (driven by site.js, same markup as SEO pages) */
  .article-content .faq-item {
    border: 1px solid var(--rule); border-radius: 12px;
    padding: 18px 20px; margin: 0 0 12px; cursor: pointer;
  }
  .article-content .faq-item h3 { margin: 0; font-size: 17px; }
  .article-content .faq-item .answer { display: none; margin-top: 12px; }
  .article-content .faq-item.open .answer { display: block; }
  .article-content .faq-item .answer p:last-child { margin-bottom: 0; }

  /* Foot-of-article CTA */
  .article-cta {
    margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--rule);
    display: flex; flex-wrap: wrap; gap: 16px; align-items: center;
  }
  .article-cta .btn-solid {
    background: var(--ink); color: var(--paper);
    padding: 12px 22px; border-radius: 8px;
    font-weight: 600; text-decoration: none;
    display: inline-flex; align-items: center; gap: 8px;
    transition: transform 0.15s var(--ease-spring), background 0.15s;
  }
  .article-cta .btn-solid:hover { background: #000; transform: translateY(-1px); }
  .article-cta .btn-link { color: var(--ink-soft); text-decoration: none; font-weight: 500; }
  .article-cta .btn-link:hover { color: var(--ink); }

  /* ============================================================
     RESPONSIVE (blog-specific; masthead handled by canonical 720px rule)
     ============================================================ */
  @media (max-width: 768px) {
    .blog-hero { padding: 40px 20px 16px; }
    .blog-hero h1 { font-size: 32px; }
    .blog-grid { width: calc(100% - 40px); margin: 24px auto 64px; padding: 0; gap: 0; grid-template-columns: 1fr; }
    .article-wrap { padding: 36px 20px 64px; }
    .article-hero-inner { padding: 0 20px; }
    .article-content { font-size: 16px; }
    .article-content h2 { font-size: 23px; }
  }
