/*
Theme Name: Vingaards Officin
Theme URI: https://detblaapunkt.dk
Author: Det Blå Punkt Redaktion
Description: Rent, hurtigt og SEO-optimeret tema til Det Blå Punkt – et medie for iværksættere og digitale vækstvirksomheder.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: t-vingaardsofficin
Tags: blog, custom-logo, editor-style, featured-images, post-thumbnails, threaded-comments
*/

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black:    #0a0c10;
  --ink:      #111318;
  --ink2:     #1c1f27;
  --border:   #e8eaed;
  --text:     #1a1d24;
  --text2:    #4a5060;
  --text3:    #8a8fa0;
  --accent: #f77f00;
  --accent2:  #0035d4;
  --gold:     #c8a84b;
  --bg:       #fafbfc;
  --white:    #ffffff;
  --serif:    'Georgia', 'Times New Roman', serif;
  --sans:     -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono:     'Courier New', Courier, monospace;
  --radius:   6px;
  --shadow:   0 1px 4px rgba(0,0,0,0.07), 0 4px 20px rgba(0,0,0,0.05);
  --max:      1140px;
  --content:  720px;
}

html { font-size: 17px; scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent2); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { padding-left: 1.5em; }

/* ── Typography ──────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--sans);
  font-weight: 800;
  line-height: 1.25;
  color: var(--text);
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.9rem); margin: 2.2rem 0 0.9rem; }
h3 { font-size: 1.25rem; margin: 1.8rem 0 0.7rem; }
h4 { font-size: 1.05rem; margin: 1.4rem 0 0.5rem; }

p { margin-bottom: 1.3rem; }

.entry-content p,
.entry-content li {
  font-size: 1.05rem;
  line-height: 1.78;
  color: #2a2d36;
}

/* ── Layout ──────────────────────────────────────────────── */
.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.content-wrap { max-width: var(--content); margin: 0 auto; }

.site-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 60px;
  align-items: start;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 900px) {
  .site-layout { grid-template-columns: 1fr; gap: 40px; }
  .sidebar { display: none; }
}

/* ── Header ──────────────────────────────────────────────── */
.site-header {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 12px rgba(0,0,0,0.06);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-mark {
  width: 34px;
  height: 34px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.logo-mark::after {
  content: '';
  width: 12px;
  height: 12px;
  background: white;
  border-radius: 50%;
  position: absolute;
}

.logo-text {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
}

.logo-text span { color: var(--accent); }

/* ── Navigation ──────────────────────────────────────────── */
.main-nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 2px;
}

.main-nav a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text2);
  padding: 8px 14px;
  border-radius: var(--radius);
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav .current-menu-item a {
  background: rgba(26,77,255,0.08);
  color: var(--accent);
}

.nav-cta a {
  background: var(--accent) !important;
  color: white !important;
  padding: 7px 16px !important;
}
.nav-cta a:hover { background: var(--accent2) !important; }

/* ── Hero / Top bar ──────────────────────────────────────── */
.category-bar {
  background: var(--ink);
  padding: 0;
  overflow: hidden;
}

.category-bar ul {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 0;
}

.category-bar a {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  padding: 10px 16px;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}

.category-bar a:hover { color: white; background: rgba(255,255,255,0.08); }

/* ── Archive / Home ──────────────────────────────────────── */
.page-hero {
  background: var(--ink);
  padding: 52px 0;
  margin-bottom: 48px;
  color: white;
}

.page-hero .container { text-align: center; }

.page-hero h1 {
  color: white;
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin-bottom: 12px;
}

.page-hero .tagline {
  color: rgba(255,255,255,0.6);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 auto;
}

/* ── Post Card ───────────────────────────────────────────── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 52px;
}

.post-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
  display: flex;
  flex-direction: column;
  position: relative; /* needed for stretched link */
}

.post-card:hover {
  box-shadow: 0 12px 40px rgba(26,77,255,0.1), 0 2px 8px rgba(0,0,0,0.06);
  transform: translateY(-4px);
  border-color: rgba(26,77,255,0.2);
}

/* Stretched link — makes entire card clickable */
.post-card-title a::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Keep category badge and external links above the stretched link */
.post-card-image .card-cat,
.post-card-meta a { position: relative; z-index: 2; }

.post-card-image {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #1a2040 0%, #1a4dff 100%);
  position: relative;
  overflow: hidden;
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.post-card:hover .post-card-image img { transform: scale(1.04); }

.post-card-image .card-cat {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(26,77,255,0.92);
  backdrop-filter: blur(4px);
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  text-decoration: none;
  transition: background 0.2s;
}

.post-card-image .card-cat:hover { background: var(--accent-dark, #0033cc); }

.post-card-body {
  padding: 22px 24px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card-title {
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.32;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.post-card-title a { color: var(--text); text-decoration: none; }
.post-card:hover .post-card-title a { color: var(--accent); }

.post-card-excerpt {
  font-size: 0.875rem;
  color: var(--text2);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  color: var(--text3);
  font-weight: 500;
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: auto;
}

.post-card-meta .author-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a4dff, #6e3dff);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
  flex-shrink: 0;
}

/* ── Featured post (first/large) ─────────────────────────── */
/* ── Featured hero card ──────────────────────────────────── */
.post-card.featured {
  grid-column: 1 / -1;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 500px;
  max-height: none;
  border-radius: 20px;
  overflow: hidden;
}

.post-card.featured .post-card-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: unset;
  z-index: 0;
}

.post-card.featured .post-card-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.96) 0%, rgba(0,0,0,0.88) 35%, rgba(0,0,0,0.50) 62%, rgba(0,0,0,0.0) 100%);
  z-index: 1;
}

.post-card.featured .post-card-body {
  position: relative;
  z-index: 2;
  background: transparent;
  padding: 40px 44px;
  max-width: 760px;
}

.post-card.featured .post-card-title { font-size: 2rem; line-height: 1.2; margin-bottom: 12px; }
.post-card.featured .post-card-title a { color: white; text-shadow: 0 2px 16px rgba(0,0,0,0.55); }
.post-card.featured:hover .post-card-title a { color: rgba(255,255,255,0.92); }
.post-card.featured:hover { transform: none; box-shadow: none; border-color: transparent; }
.post-card.featured .post-card-excerpt { color: #fff !important; text-shadow: 0 1px 12px rgba(0,0,0,0.9), 0 2px 24px rgba(0,0,0,0.7); -webkit-line-clamp: 2; }
.post-card.featured .post-card-meta { color: rgba(255,255,255,0.72); }
.post-card.featured .post-card-meta a { color: rgba(255,255,255,0.9); }
.post-card.featured .post-card-image img { transform: none !important; }
.post-card.featured:hover .post-card-image img { transform: scale(1.02) !important; transition: transform 6s ease; }

/* Section label between hero and grid */
.grid-section-label {
  grid-column: 1 / -1;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text2);
  padding: 8px 0 4px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 4px;
}

@media (max-width: 700px) {
  .post-card.featured { min-height: 360px; }
  .post-card.featured .post-card-body { padding: 24px 20px; }
  .post-card.featured .post-card-title { font-size: 1.4rem; }
}

/* ── Single post ─────────────────────────────────────────── */
.single-hero {
  background: var(--ink);
  padding: 60px 0 52px;
  color: white;
  margin-bottom: 0;
}

.single-hero .container { max-width: 820px; }

.post-category-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(200,168,75,0.4);
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 18px;
  text-decoration: none;
}

.single-hero h1 {
  color: white;
  font-size: clamp(1.75rem, 4.5vw, 3rem);
  line-height: 1.2;
  margin-bottom: 18px;
  max-width: 800px;
}

.post-meta-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.author-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
}

.author-chip .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  flex-shrink: 0;
}

.author-chip .author-info { line-height: 1.3; }
.author-chip .author-name { font-size: 0.88rem; font-weight: 700; color: white; }
.author-chip .author-role { font-size: 0.75rem; color: rgba(255,255,255,0.5); }

.meta-sep { color: rgba(255,255,255,0.25); }
.post-date { font-size: 0.82rem; color: rgba(255,255,255,0.5); }
.read-time { font-size: 0.82rem; color: rgba(255,255,255,0.5); }

/* ── Article content ─────────────────────────────────────── */
.article-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
}

.entry-content {
  padding: 48px 0 60px;
}

.entry-content h2 {
  font-size: 1.6rem;
  margin: 2.5rem 0 1rem;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}

.entry-content h3 { font-size: 1.2rem; color: var(--accent); }

.entry-content ul, .entry-content ol {
  margin-bottom: 1.3rem;
}

.entry-content li { margin-bottom: 0.4rem; }

.entry-content strong { font-weight: 700; color: var(--text); }

.entry-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

blockquote {
  border-left: 4px solid var(--accent);
  margin: 2rem 0;
  padding: 16px 24px;
  background: rgba(26,77,255,0.04);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text2);
}

/* ── Table of contents ───────────────────────────────────── */
.toc-box {
  background: #f4f6fb;
  border: 1px solid #dde2ef;
  border-radius: 10px;
  padding: 22px 26px;
  margin: 2rem 0;
}

.toc-box h4 {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 12px;
  margin-top: 0;
}

.toc-box ol { padding-left: 1.4em; }
.toc-box li { margin-bottom: 6px; }
.toc-box a { color: var(--accent); font-size: 0.92rem; text-decoration: none; font-weight: 500; }
.toc-box a:hover { text-decoration: underline; }

/* ── Author box ──────────────────────────────────────────── */
.author-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 32px;
  margin: 48px 0;
  display: flex;
  gap: 22px;
  align-items: flex-start;
}

.author-box .avatar-lg {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, #6e3dff 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
  flex-shrink: 0;
}

.author-box-name { font-size: 1rem; font-weight: 800; margin-bottom: 4px; }
.author-box-role { font-size: 0.8rem; color: var(--accent); font-weight: 600; margin-bottom: 10px; }
.author-box-bio { font-size: 0.9rem; color: var(--text2); line-height: 1.6; }

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar { padding-top: 8px; }

.sidebar-widget {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px;
  margin-bottom: 24px;
}

.widget-title {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.sidebar-post {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}
.sidebar-post:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.sidebar-post-thumb {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  background: linear-gradient(135deg, #1a2040 0%, #1a4dff 100%);
  flex-shrink: 0;
  overflow: hidden;
}

.sidebar-post-thumb img { width: 100%; height: 100%; object-fit: cover; }

.sidebar-post-title {
  font-size: 0.87rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}

.sidebar-post:hover .sidebar-post-title { color: var(--accent); }

/* ── Newsletter widget ───────────────────────────────────── */
.newsletter-widget {
  background: var(--ink);
  border-radius: 10px;
  padding: 24px;
  color: white;
  border: none;
}

.newsletter-widget .widget-title { color: rgba(255,255,255,0.45); border-bottom-color: rgba(255,255,255,0.1); }
.newsletter-widget p { font-size: 0.88rem; color: rgba(255,255,255,0.6); margin-bottom: 14px; }

.nl-form { display: flex; flex-direction: column; gap: 8px; }
.nl-form input {
  padding: 10px 14px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.08);
  color: white;
  font-size: 0.88rem;
  outline: none;
}
.nl-form input::placeholder { color: rgba(255,255,255,0.35); }
.nl-form input:focus { border-color: rgba(26,77,255,0.6); }

.nl-form button {
  padding: 10px 14px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.nl-form button:hover { background: var(--accent2); }

/* ── Category pills in sidebar ───────────────────────────── */
.cat-list { list-style: none; padding: 0; }
.cat-list li { margin-bottom: 6px; }
.cat-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  color: var(--text2);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
  transition: color 0.15s;
}
.cat-list a:hover { color: var(--accent); }
.cat-list .count {
  font-size: 0.75rem;
  background: var(--border);
  color: var(--text3);
  padding: 2px 7px;
  border-radius: 20px;
  font-weight: 600;
}

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.55);
  padding: 52px 0 28px;
  margin-top: 80px;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

@media (max-width: 700px) {
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
}

.footer-brand .logo-text { color: white; font-size: 1.2rem; margin-bottom: 12px; display: block; }
.footer-brand p { font-size: 0.88rem; line-height: 1.65; max-width: 280px; }

.footer-col h4 {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 14px;
  font-weight: 700;
}

.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: rgba(255,255,255,0.55); font-size: 0.9rem; text-decoration: none; transition: color 0.15s; }
.footer-col a:hover { color: white; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-bottom a { color: rgba(255,255,255,0.4); text-decoration: none; }
.footer-bottom a:hover { color: white; }

/* ── Pagination ──────────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 48px 0;
}

.pagination a, .pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  border: 1px solid var(--border);
  color: var(--text2);
  text-decoration: none;
  transition: all 0.15s;
}

.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .current { background: var(--accent); color: white; border-color: var(--accent); }

/* ── Author avatar img ───────────────────────────────────── */
.author-avatar-wrap img,
.author-chip img,
.author-chip .avatar-initials {
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  flex-shrink: 0;
  height: auto !important;
  aspect-ratio: 1 / 1;
}

.related-posts {
  border-top: 2px solid var(--border);
  padding-top: 36px;
  margin-top: 12px;
}

.related-title {
  font-size: 0.8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 20px;
  margin-top: 0;
}

.related-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
  gap: 18px !important;
}

/* ── Mobile navigation ───────────────────────────────────── */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  width: 40px;
  align-items: center;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  /* Header */
  .header-inner { padding: 0 16px; gap: 0; }
  .nav-toggle { display: flex; }

  .main-nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    z-index: 200;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  }

  .main-nav.open { display: block; }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0 16px;
  }

  .main-nav a {
    display: block;
    padding: 14px 8px;
    border-bottom: 1px solid var(--border);
    font-size: 1rem;
    white-space: normal;
  }

  .nav-cta a {
    margin-top: 8px;
    text-align: center;
    border-bottom: none !important;
  }

  /* Category bar */
  .category-bar ul { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .category-bar a { white-space: nowrap; }

  /* Hero */
  .page-hero { padding: 36px 0; }
  .page-hero h1 { font-size: 1.8rem; }
  .single-hero { padding: 36px 0 28px; }
  .single-hero h1 { font-size: 1.55rem; }

  /* Post meta bar wrapping */
  .post-meta-bar { gap: 10px; }
  .meta-sep { display: none; }
  .post-date, .read-time { font-size: 0.78rem; }

  /* Cards */
  .posts-grid { grid-template-columns: 1fr; gap: 16px; }

  /* Article */
  .article-wrap { padding: 0 16px; }
  .entry-content { padding: 28px 0 40px; }
  .entry-content h2 { font-size: 1.3rem; }
  .entry-content p, .entry-content li { font-size: 1rem; }

  /* Author box */
  .author-box { flex-direction: column; gap: 16px; padding: 20px; }
  .author-box .author-avatar-wrap img { width: 56px !important; }

  /* Sidebar hidden on mobile */
  .sidebar { display: none; }

  /* Footer */
  .footer-top { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; text-align: center; }

  /* Related posts */
  .related-grid { grid-template-columns: 1fr !important; }
}

@media (max-width: 480px) {
  .container { padding: 0 14px; }
  .post-card-body { padding: 16px; }
  .single-hero h1 { font-size: 1.35rem; }
  .toc-box { padding: 16px; }
}

/* ── Cookie Banner ───────────────────────────────────────── */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 2px solid var(--accent);
  box-shadow: 0 -4px 32px rgba(0,0,0,0.12);
  z-index: 9999;
  padding: 16px 20px;
}

.cookie-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.cookie-inner p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text2);
  flex: 1;
  min-width: 220px;
}

.cookie-inner p a { color: var(--accent); }

.cookie-btns {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-accept, .cookie-minimal {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  font-family: inherit;
}

.cookie-accept {
  background: var(--accent);
  color: #fff;
}

.cookie-accept:hover { background: var(--accent2); transform: translateY(-1px); }

.cookie-minimal {
  background: var(--bg);
  color: var(--text2);
  border: 1px solid var(--border);
}

.cookie-minimal:hover { background: var(--border); }

@media (max-width: 600px) {
  .cookie-btns { width: 100%; }
  .cookie-accept, .cookie-minimal { flex: 1; text-align: center; }
}

/* ── Utilities ───────────────────────────────────────────── */
.text-center { text-align: center; }
.mt-0 { margin-top: 0 !important; }

/* ── Layout: Fullwidth Editorial ──────────────────────────── */
.fw-hero { position: relative; height: 85vh; min-height: 540px; max-height: 900px; overflow: hidden; }
.fw-hero-bg { position: absolute; inset: 0; }
.fw-hero-bg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fw-vignette { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.96) 0%, rgba(0,0,0,0.70) 30%, rgba(0,0,0,0.15) 65%, rgba(0,0,0,0) 100%); }
.fw-hero-inner { position: absolute; bottom: 0; left: 0; right: 0; padding: 64px; max-width: 920px; }
.fw-title { font-size: 3.2rem; line-height: 1.1; color: #fff; font-weight: 900; letter-spacing: -0.03em; margin: 14px 0 18px; text-shadow: 0 2px 20px rgba(0,0,0,0.6); }
.fw-title a { color: inherit; }
.fw-excerpt { color: #fff !important; font-size: 1.1rem; line-height: 1.6; margin-bottom: 22px; text-shadow: 0 1px 12px rgba(0,0,0,0.9), 0 2px 24px rgba(0,0,0,0.7); max-width: 640px; }
.fw-meta { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,0.65); font-size: 0.88rem; }
.fw-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-bottom: 52px; }
@media (max-width: 1024px) { .fw-grid { grid-template-columns: repeat(2, 1fr); } .fw-title { font-size: 2.4rem; } .fw-hero-inner { padding: 48px; } }
@media (max-width: 640px) { .fw-grid { grid-template-columns: 1fr; } .fw-title { font-size: 1.8rem; } .fw-hero { height: 70vh; } .fw-hero-inner { padding: 28px 20px; } }

/* ── Layout: Magazine Split ───────────────────────────────── */
.mag-hero { display: grid; grid-template-columns: 1fr 1fr; min-height: 580px; }
.mag-hero-text { background: var(--accent); color: #fff; padding: 64px 56px; display: flex; flex-direction: column; justify-content: center; gap: 0; }
.mag-kicker { display: block; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.72rem; font-weight: 800; opacity: 0.72; margin-bottom: 14px; }
.mag-title { font-size: 2.6rem; line-height: 1.1; letter-spacing: -0.03em; margin: 0 0 16px; font-weight: 900; }
.mag-title a { color: #fff; }
.mag-excerpt { opacity: 0.88; line-height: 1.6; font-size: 1rem; margin-bottom: 20px; max-width: 440px; }
.mag-meta { font-size: 0.83rem; opacity: 0.65; margin-bottom: 28px; display: flex; gap: 8px; align-items: center; }
.mag-cta { display: inline-block; border: 2px solid rgba(255,255,255,0.6); padding: 11px 28px; font-weight: 800; font-size: 0.9rem; color: #fff !important; letter-spacing: 0.02em; border-radius: 4px; transition: all .2s; width: fit-content; }
.mag-cta:hover { background: rgba(255,255,255,0.15); border-color: #fff; }
.mag-hero-image { overflow: hidden; }
.mag-hero-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 768px) { .mag-hero { grid-template-columns: 1fr; } .mag-hero-image { min-height: 280px; order: -1; } .mag-hero-text { padding: 40px 24px; } .mag-title { font-size: 1.8rem; } }


/* SKIN: Spacious */
.posts-grid { grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); gap: 32px; }
.post-card-body { padding: 28px 30px 30px; }
.post-card-title { font-size: 1.2rem; line-height: 1.28; }
.post-card-excerpt { font-size: 0.92rem; -webkit-line-clamp: 4; }
.post-card { border-radius: 18px; }
.post-card:not(.featured):hover { transform: translateY(-6px); box-shadow: 0 20px 60px rgba(0,0,0,0.12); }
.post-card.featured { min-height: 560px; border-radius: 24px; }
.post-card.featured .post-card-body { padding: 48px 52px; max-width: 840px; }
.post-card.featured .post-card-title { font-size: 2.4rem; }
@media (max-width: 900px) { .posts-grid { grid-template-columns: 1fr; } }

/* LOGO: slash */
.logo-mark { display:none !important; }
.logo-slash-wrap { font-size:1.15rem; font-weight:900; letter-spacing:0.04em; text-transform:uppercase; color:inherit; }
.logo-slash-sep { color:var(--accent); margin:0 2px; font-weight:300; }

/* ── AUTO-PATCH v10 (patch_css.py) ── */

/* Category badge — shared across all card types */
.card-cat {
  background: var(--accent);
  backdrop-filter: blur(4px);
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  text-decoration: none;
  transition: background 0.2s;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
}
.card-cat:hover { background: var(--accent-dark, var(--accent)); filter: brightness(0.85); }
.post-card-image .card-cat { position: absolute; top: 14px; left: 14px; }
.ed-hero-image .card-cat    { position: absolute; top: 18px; left: 18px; }
.ed-sec-image .card-cat     { position: absolute; top: 10px; left: 10px; }
.list-card--hero .list-card-image .card-cat { position: absolute; top: 14px; left: 14px; }
.list-card:not(.list-card--hero) .list-card-image .card-cat { display: none; }

/* Hero card — image must fill full card height via absolute positioning */
/* aspect-ratio on a non-replaced element prevents grid-stretch, leaving blank space */
.list-card--hero .list-card-image { aspect-ratio: unset; min-height: 220px; position: relative; overflow: hidden; display: block; }
.list-card--hero .list-card-image img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

/* List layout — image stretches to match card height so nothing looks misaligned */
.list-card:not(.list-card--hero) { grid-template-columns: 220px 1fr; align-items: stretch; }
/* Image container: no fixed height — stretches with the card, img fills it absolutely */
.list-card:not(.list-card--hero) .list-card-image { aspect-ratio: unset; height: auto; min-height: 130px; align-self: stretch; position: relative; overflow: hidden; display: block; }
.list-card:not(.list-card--hero) .list-card-image img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.list-card:not(.list-card--hero) .list-card-body { padding: 20px 24px; align-self: center; }
.list-card:not(.list-card--hero) .list-card-title { font-size: 1.05rem; }
.list-card:not(.list-card--hero) .list-card-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.85rem;
  color: var(--text2);
  line-height: 1.6;
  margin-bottom: 10px;
}
@media (max-width: 860px) {
  .list-card:not(.list-card--hero) { grid-template-columns: 140px 1fr; }
  .list-card:not(.list-card--hero) .list-card-image { min-height: 90px; }
  .list-card:not(.list-card--hero) .list-card-excerpt { display: none; }
}

/* List card meta — author avatar circle (was only scoped to post-card-meta) */
.list-card-meta .author-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a4dff, #6e3dff);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
  flex-shrink: 0;
}

/* single-v3 author chip — white text was invisible on white header background */
/* <header> tag is unique to v3; v1/v2 use .single-hero div, so this is safe */
header .author-chip .author-name { color: var(--ink); }
header .author-chip .author-role { color: var(--text3); font-size: 0.75rem; }
header .meta-sep { color: var(--text3); }

/* Nav overflow fix — long category names expand past header width */
.main-nav a { font-size: 0.82rem; padding: 7px 10px; max-width: 170px; overflow: hidden; text-overflow: ellipsis; display: inline-block; }
