/* ══════════════════════════════════════════════════
   BLOG STYLESHEET
   ──────────────────────────────────────────────────
   Standalone CSS for /blog and /blog/* pages. Mirrors the B2C design
   tokens from public/css/main.css so the blog feels like a natural
   part of the consumer site (paper/typewriter aesthetic, warm browns,
   square-cornered cards, monospace + serif headings).

   We deliberately don't import main.css — that file pulls in a lot of
   game-screen, modal, and animation rules the blog doesn't need, and
   doubles the payload for read-only marketing pages.

   When tokens change in main.css (`:root`), update them here too.
   ══════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(28, 25, 23, 0.12);
}

/* Tokens — kept in sync with public/css/main.css */
:root {
  --paper:      #f5f0e8;
  --paper2:     #ede8df;
  --white:      #fffffe;
  --ink:        #1c1917;
  --ink2:       #3d3730;
  --muted:      #5b4f3e;
  --border:     #b8a78a;
  --border2:    #9a8a6e;
  --focus-ring: #1c1917;

  --denied:     #c41230;
  --approved:   #14532d;
  --review:     #b45309;

  --serif: 'Playfair Display', Georgia, serif;
  --mono:  'Courier Prime', 'Courier New', monospace;
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html, body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Subtle paper-line background — same vibe as B2C screens. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 27px,
    rgba(184, 167, 138, 0.18) 27px,
    rgba(184, 167, 138, 0.18) 28px
  );
  pointer-events: none;
  z-index: 0;
}

/* ══════════════════════════════
   TOP NAV (minimal — logo + back to game + blog)
   Fixed top-right, matches main.css .top-nav layout.
══════════════════════════════ */
.top-nav {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 6px;
}
.top-nav-btn {
  display: inline-block;
  background: var(--paper);
  border: 1px solid var(--border2);
  padding: 6px 12px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink2);
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
}
.top-nav-btn:hover { border-color: var(--ink2); color: var(--ink); }
.top-nav-btn.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.top-nav-btn.primary:hover { background: var(--ink2); border-color: var(--ink2); }

/* ══════════════════════════════
   PAGE LAYOUT — narrow reading column
══════════════════════════════ */
.blog-wrap {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 80px 20px 60px;
}

/* Breadcrumb (above the headline) */
.blog-crumbs {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 28px;
  text-transform: uppercase;
}
.blog-crumbs a {
  color: var(--ink2);
  text-decoration: none;
  border-bottom: 1px dotted var(--border2);
}
.blog-crumbs a:hover { color: var(--ink); border-bottom-color: var(--ink); }
.blog-crumbs .sep { margin: 0 8px; color: var(--border2); }

/* ══════════════════════════════
   INDEX PAGE (/blog)
══════════════════════════════ */
.blog-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--denied);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.blog-title {
  font-family: var(--serif);
  font-size: 38px;
  line-height: 1.1;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}
.blog-sub {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink2);
  margin-bottom: 40px;
  line-height: 1.6;
}

.blog-section-header {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: var(--muted);
  text-transform: uppercase;
  margin: 36px 0 14px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

/* Jurisdiction quick-jump pills */
.jur-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.jur-link {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 10px 16px;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--ink);
  transition: border-color 0.12s, background 0.12s;
}
.jur-link:hover { border-color: var(--ink); background: var(--paper2); }

/* Post list cards */
.post-list { display: grid; gap: 12px; }
.post {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 3px solid var(--ink);
  padding: 18px 22px;
  text-decoration: none;
  display: block;
  transition: border-color 0.12s, transform 0.12s;
}
.post:hover {
  border-color: var(--ink);
  border-left-color: var(--denied);
  transform: translateX(2px);
}
.post-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  background: var(--paper2);
  color: var(--ink2);
  border: 1px solid var(--border);
  padding: 2px 8px;
  margin-right: 4px;
  margin-bottom: 8px;
}
.post-title {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin: 4px 0 6px;
  line-height: 1.25;
}
.post-desc {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink2);
  line-height: 1.55;
}

/* ══════════════════════════════
   ARTICLE PAGE (/blog/*)
══════════════════════════════ */
.article-headline {
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1.15;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}
.article-meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.article-meta .meta-author { color: var(--ink); font-weight: 700; }
.article-meta .meta-read   { color: var(--ink2); }
.article-meta .meta-updated { color: var(--ink2); }
.article-meta .meta-tags    { color: var(--muted); }
.article-meta .meta-sep     { color: var(--border2); }
@media (max-width: 600px) {
  .article-meta { gap: 6px; font-size: 10px; }
}

/* E-E-A-T footer block at the end of every article */
.article-footer-meta {
  margin-top: 44px;
  padding: 22px 26px;
  background: var(--paper2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border2);
}
.article-footer-meta-title {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--ink2);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.article-footer-meta p {
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink2);
  margin-bottom: 8px;
}
.article-footer-meta .article-footer-meta-line {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-top: 10px;
  margin-bottom: 0;
}

.article-body h2 {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: var(--denied);
  text-transform: uppercase;
  margin: 36px 0 12px;
}
.article-body p {
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink2);
  margin-bottom: 14px;
  line-height: 1.7;
}
.article-body strong { color: var(--ink); font-weight: 700; }
/* Base link styles inside articles — wrapped in :where() so the selector
   contributes 0 specificity. Lets a single class (.cta, .back-foot,
   .related-list a) override color/decoration without specificity battles. */
:where(.article-body) a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--border2);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.12s;
}
:where(.article-body) a:hover { text-decoration-color: var(--denied); }
.article-body ul, .article-body ol {
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink2);
  margin: 0 0 16px 22px;
  line-height: 1.65;
}
.article-body li { margin-bottom: 8px; }

/* Inline law/regulation tag (e.g. <span class="law">GDPR Art. 17</span>) */
.law {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  background: var(--paper2);
  color: var(--ink);
  border: 1px solid var(--border);
  padding: 2px 8px;
  margin-left: 4px;
  vertical-align: 1px;
  text-transform: uppercase;
}

/* Jurisdiction prefix label (e.g. "🇪🇺 EU" before a paragraph) */
.jur {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  background: var(--ink);
  color: var(--paper);
  padding: 3px 9px;
  margin-bottom: 4px;
  text-transform: uppercase;
}

/* Verdict markers used in tables (valid / invalid claim) */
.valid {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--approved);
  text-transform: uppercase;
}
.invalid {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--denied);
  text-transform: uppercase;
}

.article-body blockquote {
  border-left: 3px solid var(--ink);
  background: var(--white);
  padding: 14px 20px;
  margin: 20px 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink2);
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-family: var(--mono);
  font-size: 13px;
  background: var(--white);
  border: 1px solid var(--border);
}
.article-body th {
  background: var(--paper2);
  color: var(--ink);
  text-align: left;
  padding: 10px 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}
.article-body td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--ink2);
}
.article-body tr:last-child td { border-bottom: none; }

/* Call-to-action box at end of article */
.cta-box {
  margin-top: 44px;
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 3px solid var(--ink);
  padding: 22px 26px;
}
.cta-box p {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink2);
  line-height: 1.55;
  margin-bottom: 14px;
}
.cta {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  padding: 11px 22px;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  transition: background 0.12s;
}
.cta:hover { background: var(--ink2); border-color: var(--ink2); }

/* Footer back-link */
.back-foot {
  display: inline-block;
  margin-top: 44px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--ink2);
  text-decoration: none;
  border-bottom: 1px dotted var(--border2);
}
.back-foot:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* "Related guides" list — looks like a footer references block */
.related-list {
  list-style: none;
  margin: 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--border);
}
.related-list li { margin: 8px 0; }
.related-list a {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px dotted var(--border2);
}
.related-list a:hover { border-bottom-color: var(--ink); }

/* ══════════════════════════════════════════════════
   JURISDICTION / GUIDE PAGES
   /india, /eu, /uk, /us, /au use the same shell as blog
   articles but with extra building blocks: a "key laws"
   list with .law tags, a "cases in the game" grid, and
   a small subtitle under the headline.
══════════════════════════════════════════════════ */

/* Smaller subtitle under guide H1 (guides are not articles
   so they don't get the full byline) */
.guide-sub {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 8px 0 38px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

/* Section label — same look as .blog-section-header but
   used inside the article body */
.guide-section {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink2);
  margin: 36px 0 14px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

/* Card grid for "Cases in the Game" and "Related Guides" */
.case-grid {
  display: grid;
  gap: 10px;
  margin: 14px 0 4px;
}
.case-item {
  background: var(--paper2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border2);
  padding: 14px 18px;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink2);
  transition: border-left-color 0.12s, background 0.12s;
}
.case-item strong {
  display: block;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  margin-bottom: 4px;
}
.case-item span { color: var(--ink2); }
a.case-item, a.case-item:hover { text-decoration: none; }
a.case-item:hover {
  border-left-color: var(--ink);
  background: var(--white);
}

/* "DENIED" rubber-stamp marker on case cards */
.stamp {
  display: inline-block;
  border: 2px solid var(--denied);
  color: var(--denied);
  padding: 1px 8px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  margin-right: 8px;
  vertical-align: 2px;
  transform: rotate(-1deg);
}

/* "Key Laws" / "When to Escalate" lists in guide pages —
   visually distinct from article-body lists */
.guide-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}
.guide-list li {
  position: relative;
  padding: 10px 0 10px 22px;
  border-bottom: 1px solid var(--border);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink2);
}
.guide-list li::before {
  content: "§";
  position: absolute;
  left: 0;
  top: 10px;
  font-family: var(--serif);
  font-size: 16px;
  color: var(--border2);
  font-weight: 700;
}
.guide-list li:last-child { border-bottom: none; }
.guide-list li strong {
  font-family: var(--serif);
  font-weight: 700;
  color: var(--ink);
}

/* ══════════════════════════════
   RESPONSIVE
══════════════════════════════ */
@media (max-width: 600px) {
  .blog-wrap { padding: 70px 16px 40px; }
  .blog-title { font-size: 28px; }
  .article-headline { font-size: 24px; }
  .top-nav { top: 8px; right: 8px; }
  .top-nav-btn { padding: 5px 10px; font-size: 10px; }
  .article-body p, .article-body ul, .article-body ol { font-size: 15px; }
  .post-title { font-size: 17px; }
  .case-item { padding: 12px 14px; font-size: 13px; }
  .case-item strong { font-size: 15px; }
  .guide-list li { font-size: 13px; padding-left: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
