/* Inter loaded via Google Fonts — see layout.ejs */

/* ── Tokens moved to kernel/design/tokens.css (served at /design/tokens.css,
   loaded by layout.ejs BEFORE this file). Themes reassign them — see
   kernel/design/themes/. */

/* ── Page transitions ────────────────────────────────────────────────────── */
@view-transition { navigation: auto; }

@keyframes vt-fade-in  { from { opacity: 0; translate: 0 6px; } to { opacity: 1; translate: 0 0; } }
@keyframes vt-fade-out { from { opacity: 1; translate: 0 0; } to { opacity: 0; translate: 0 -6px; } }

::view-transition-new(root) { animation: 220ms ease vt-fade-in; }
::view-transition-old(root) { animation: 180ms ease vt-fade-out; }

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

html { font-size: 19px; scrollbar-gutter: stable; }

body {
  font-family: var(--font);
  background:  var(--bg);
  color:       var(--text);
  line-height: var(--lh-base);
  min-height:  100vh;
  display:     flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-h); text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

/* ── Layout ──────────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: calc(var(--max-w) + var(--s-6));
  margin: 0 auto;
  padding: 0 var(--s-4);
}

main.container {
  /* padding-top: var(--s-4); */
  padding-bottom: 0;
  flex: 1;
}
main.container:has(.home-page) { padding-top: 0; }
.home-page .post-body > *:first-child { margin-top: 0; }
.home-page .post-body > .shortcode-posts { margin-top: 0; }

/* ── Header — sticky, hides on scroll-down, returns on scroll-up ─────────── */
.site-header {
  position: relative;
  z-index: 50;
  background: var(--bg);
  padding: var(--s-5) 0 0;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--s-4);
  border-bottom: 1px solid var(--border);
}

.site-title {
  font-family: var(--font-ui);
  font-weight: 100;
  font-size: 2.75rem;
  letter-spacing: 0.08em;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}
.site-title:hover { text-decoration: none; color: var(--text); }

/* ── Hamburger (mobile default — hidden on wider screens) ────────────────── */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 1.5rem; height: 1.1rem;
  background: none; border: none; cursor: pointer; padding: 0;
  margin-left: auto;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block; width: 100%; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform 0.22s, opacity 0.22s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ── Nav — mobile default: hidden drawer below header ────────────────────── */
.site-header nav {
  display: none;
  flex-direction: column;
  gap: 0;
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  font-family: var(--font-ui);
  padding: var(--s-2) 0;
}
.site-header nav.open { display: flex; }
.site-header nav a {
  padding: var(--s-3) var(--s-4);
  font-size: var(--fs-base);
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
}
.site-header nav a:last-child { border-bottom: none; }
.site-header nav a:hover { color: var(--text); text-decoration: underline; background: var(--surface); cursor: pointer; }

/* ── Dropdowns — mobile ──────────────────────────────────────────────────── */
.nav-dropdown-toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-3) var(--s-4); min-height: 44px;
  background: none; border: none; border-bottom: 1px solid var(--border);
  font-family: var(--font-ui); font-size: var(--fs-base); color: var(--muted);
  cursor: pointer; text-align: left;
}
.nav-dropdown-toggle:hover { color: var(--text); background: var(--surface); }
.nav-caret { font-size: .7em; transition: transform .2s; }
.nav-dropdown.open .nav-caret { transform: rotate(180deg); }
.nav-dropdown-menu { display: none; flex-direction: column; background: #ffffff; }
.nav-dropdown.open .nav-dropdown-menu { display: flex; }
.nav-dropdown-menu a { padding: var(--s-3) var(--s-4) var(--s-3) var(--s-6); font-size: var(--fs-base); color: var(--muted); border-bottom: 1px solid var(--border); min-height: 48px; display: flex; align-items: center; }
.nav-dropdown-menu a:last-child { border-bottom: none; }
.nav-dropdown-menu a:hover { color: var(--text); background: var(--surface); }

/* ── Tablet+ — inline nav, no hamburger ─────────────────────────────────── */
@media (min-width: 640px) {
  .nav-toggle { display: none; }
  .site-header nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    position: static;
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
    gap: var(--s-3);
  }
  .site-header nav a {
    padding: 0;
    font-size: var(--fs-sm);
    color: var(--muted);
    border: none;
    min-height: auto;
  }
  .site-header nav a:hover { background: none; text-decoration: underline; cursor: pointer; }

  /* Dropdowns — desktop */
  .nav-dropdown { position: relative; }
  .nav-dropdown-toggle {
    width: auto; min-height: auto; padding: 0; border: none;
    font-size: var(--fs-sm); color: var(--muted);
    justify-content: flex-start; gap: var(--s-1);
  }
  .nav-dropdown-toggle:hover { background: none; color: var(--text); }
  .nav-dropdown-menu {
    position: absolute; top: calc(100% + var(--s-2)); left: 0;
    background: #ffffff; border: 1px solid var(--border);
    border-radius: var(--radius-sm); box-shadow: 0 4px 16px rgba(0,0,0,.1);
    padding: var(--s-1) 0; min-width: 130px; z-index: 200;
  }
  .nav-dropdown.open .nav-dropdown-menu { display: flex; padding-left: 10px; }
  .nav-dropdown-menu a {
    padding: var(--s-3) var(--s-4) var(--s-3) var(--s-5); font-size: var(--fs-sm); color: var(--muted);
    border: none; min-height: auto; white-space: nowrap;
  }
  .nav-dropdown-menu a:hover { background: var(--surface); color: var(--text); }
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer {
  padding: 0;
  font-size: var(--fs-sm);
  font-family: var(--font-ui);
  color: var(--muted);
  margin-top: 0;
}
.site-footer .container {
  border-top: 1px solid var(--border);
  padding-top: var(--s-4);
  padding-bottom: var(--s-5);
}
.footer-custom { color: var(--muted); }
.footer-custom p { margin-bottom: var(--s-2); }
.footer-custom a { color: var(--muted); }
.footer-custom a:hover { color: var(--text); text-decoration: none; }
.footer-nav {
  display: flex; flex-wrap: wrap;
  justify-content: center;
  gap: var(--s-1) var(--s-5);
  margin-bottom: var(--s-2);
}
.footer-nav a { color: var(--muted); }
.footer-nav a:hover { color: var(--text); text-decoration: none; }
.footer-copy { margin: 0; }

/* ── Page header ─────────────────────────────────────────────────────────── */
.page-header { margin-bottom: var(--s-7); }
.page-header h1 { font-size: var(--fs-2xl); display: none; }
.site-desc { color: var(--muted); margin-top: var(--s-2); }
.tag-highlight { color: var(--accent); }

/* ── Post list ───────────────────────────────────────────────────────────── */
.post-list { display: flex; flex-direction: column; gap: var(--s-7); }

.post-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  position: relative;
  transition: box-shadow .15s, transform .15s;
}
.post-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.12); transform: translateY(-2px); }

/* Stretched link — whole card is clickable */
.card-link { position: absolute; inset: 0; z-index: 1; }

.post-card .post-cover { display: block; position: relative; }
.post-card .post-cover img {
  display: block; width: 100%; height: 220px; object-fit: cover;
  margin: 0;
}

/* Overlay kicker on image */
.post-cover .post-kicker {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: var(--s-4) var(--s-4) var(--s-3);
  background: linear-gradient(to top, rgba(0,0,0,.55) 0%, transparent 100%);
  color: rgba(255,255,255,.9);
  margin-bottom: 0;
  text-transform: none;
  font-weight: 500;
  letter-spacing: 0;
}
.post-cover .post-kicker .tag {
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.3);
  color: #fff;
}

.post-card-body { padding: var(--s-5) var(--s-5) var(--s-4); }

/* ── Post kicker — date + tags above title ───────────────────────────────── */
.post-kicker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-2);
  font-size: var(--fs-xs);
  font-family: var(--font-ui);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--s-2);
}

/* ── Tags ────────────────────────────────────────────────────────────────── */
.tag {
  display: inline-block;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.15em 0.7em;
  font-size: var(--fs-xs);
  font-family: var(--font-ui);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
  text-decoration: none;
}
.tag:hover { border-color: var(--accent); color: var(--accent); background: rgba(155, 179, 146, 0.12); text-decoration: none; }
.post-cover .post-kicker .tag:hover { border-color: var(--accent); background: rgba(155, 179, 146, 0.55); color: #fff; }
.tag-link { position: relative; z-index: 2; }

/* Keep post-meta for single post pages */
.post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-2);
  font-size: var(--fs-xs);
  font-family: var(--font-ui);
  color: var(--muted);
  margin-bottom: var(--s-4);
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--border);
}

.post-card h2 { font-size: var(--fs-2xl); font-family: var(--font-ui); font-weight: 300; margin: 0 0 var(--s-3); line-height: 1.1; color: var(--text); }
.post-body .post-card h2 { border-bottom: none; padding-bottom: 0; margin: 0 0 var(--s-3); line-height: 1.1; }
.excerpt, .post-body .excerpt, .post-body p.excerpt { color: var(--muted); font-size: var(--fs-base); font-family: var(--font-ui); margin: 0; line-height: 1.35; }

.empty { color: var(--muted); }

/* ── Pagination ──────────────────────────────────────────────────────────── */
.pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-top: var(--s-8);
  font-size: var(--fs-sm);
  color: var(--muted);
}
.pagination .next { text-align: right; }

/* ── Single post ─────────────────────────────────────────────────────────── */
.post-header { margin-bottom: var(--s-3); padding-top: var(--s-3); }
.post-header h1 {
  display: block;
  font-family: var(--font-ui);
  font-weight: 100;
  font-size: var(--fs-3xl);
  line-height: var(--lh-tight);
  margin: 0 0 var(--s-2);
}
.post-cover-full {
  width: 100%; border-radius: 4px;
  max-height: 420px; object-fit: cover;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* ── Post body (rendered markdown) ──────────────────────────────────────── */
.post-body { margin-top: var(--s-3); }

.post-body h1,
.post-body h2,
.post-body h3,
.post-body h4 {
  margin: var(--s-6) 0 var(--s-3);
  line-height: var(--lh-snug);
}
.post-body h1 { font-size: var(--fs-2xl); }
.post-body h2 {
  font-size: var(--fs-xl);
}
.post-body h3 { font-size: var(--fs-md); }

.post-body p  { margin: var(--s-4) 0; }
.post-body ul,
.post-body ol { margin: var(--s-4) 0; padding-left: 1.75rem; }
.post-body li { margin: var(--s-1) 0; }

.post-body blockquote {
  border-left: 4px solid var(--quote-bar);
  padding: var(--s-3) var(--s-5);
  margin: var(--s-6) 0;
  color: var(--muted);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
}
.post-body blockquote p { margin: 0; }
.post-body blockquote p + p { margin-top: var(--s-3); }

.post-body a { color: var(--accent); }

.post-body img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin: 0;
  background: transparent;
}
.post-body img[style*="float"] {
  width: auto;
  box-shadow: none;
  border-radius: 0;
}
.post-body p:has(> img:only-child) {
  margin: var(--s-3) 0;
  line-height: 0;
  font-size: 0;
}

/* Inline code */
.post-body code:not([class]) {
  font-family: var(--mono);
  font-size: 0.87em;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.15em 0.4em;
}

/* Code blocks */
.post-body pre {
  background: var(--code-bg);
  border-radius: var(--radius);
  padding: var(--s-5);
  overflow-x: auto;
  margin: var(--s-5) 0;
  font-size: var(--fs-sm);
  line-height: var(--lh-snug);
}
.post-body pre code {
  font-family: var(--mono);
  background: none;
  border: none;
  padding: 0;
  color: var(--code-fg);
}

.post-body table {
  width: 100%; border-collapse: collapse;
  margin: var(--s-5) 0;
  font-size: var(--fs-sm);
}
.post-body th,
.post-body td { border: 1px solid var(--border); padding: var(--s-2) var(--s-3); }
.post-body th { background: var(--surface); font-weight: 600; }

.post-body hr { border: none; border-top: 1px solid var(--border); margin: var(--s-6) 0; }

/* ── Post footer ─────────────────────────────────────────────────────────── */
.post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s-4);
  margin-top: var(--s-4);
  padding-top: var(--s-3);
  padding-bottom: var(--s-3);
  margin-bottom: 0;
  border-top: 1px solid var(--border);
}
.back-link { font-size: var(--fs-sm); line-height: 1; }
.post-nav { display: flex; gap: var(--s-4); flex-wrap: wrap; align-items: center; }
.post-tags { display: flex; gap: var(--s-2); flex-wrap: wrap; }

/* ── Tag cloud ───────────────────────────────────────────────────────────── */
.tag-cloud { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-4); }
.tag-cloud-item {
  display: inline-flex; align-items: center; gap: var(--s-1);
  padding: var(--s-1) var(--s-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: var(--fs-sm);
  font-family: var(--font-ui);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}
.tag-cloud-item:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.tag-count { font-size: var(--fs-xs); color: var(--muted); }

/* ── Error page ──────────────────────────────────────────────────────────── */
.error-page { text-align: center; padding: var(--s-8) 0; }
.error-page h1 { font-size: 5rem; color: var(--border); margin-bottom: var(--s-4); }
.error-page p  { color: var(--muted); margin-bottom: var(--s-5); }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  html { font-size: 18px; }
  .post-header h1 { font-size: var(--fs-2xl); }
  .post-card-body { padding: var(--s-4); }
}

/* ── Back to top ─────────────────────────────────────────────────────────── */
#btt {
  position: fixed; bottom: var(--s-5); right: var(--s-5); z-index: 900;
  width: 2.5rem; height: 2.5rem;
  background: var(--accent); color: #fff;
  border: none; border-radius: 50%; cursor: pointer;
  font-size: var(--fs-md); line-height: 1;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  transform: translateY(8px);
}
#btt.btt-show { opacity: 1; pointer-events: auto; transform: translateY(0); }
#btt:hover { background: var(--accent-h); }

/* ── Lightbox ─────────────────────────────────────────────────────────────── */
#lb {
  display: none;
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.92);
  align-items: center; justify-content: center;
  padding: var(--s-4);
  cursor: zoom-out;
}
#lb img {
  max-width: 100%; max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  cursor: default;
}
#lb-close {
  position: absolute; top: var(--s-4); right: var(--s-5);
  background: none; border: none; color: #fff;
  font-size: var(--fs-xl); line-height: 1; cursor: pointer;
  opacity: .7; padding: 0;
}
#lb-close:hover { opacity: 1; }

/* ── markdown-it extended features ───────────────────────────────────────── */

/* Callout containers  :::note / :::tip / :::warning etc. */
.callout {
  border-left: 4px solid var(--border);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: var(--s-3) var(--s-4);
  margin: var(--s-5) 0;
  background: var(--surface-2);
}
.callout-title {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: var(--s-2);
}
.callout-note    { border-color: var(--cl-note-bar);    background: var(--cl-note-bg); }
.callout-note    .callout-title { color: var(--cl-note-fg); }
.callout-tip     { border-color: var(--cl-tip-bar);     background: var(--cl-tip-bg); }
.callout-tip     .callout-title { color: var(--cl-tip-fg); }
.callout-warning { border-color: var(--cl-warning-bar); background: var(--cl-warning-bg); }
.callout-warning .callout-title { color: var(--cl-warning-fg); }
.callout-danger  { border-color: var(--cl-danger-bar);  background: var(--cl-danger-bg); }
.callout-danger  .callout-title { color: var(--cl-danger-fg); }
.callout-info    { border-color: var(--cl-info-bar);    background: var(--cl-info-bg); }
.callout-info    .callout-title { color: var(--cl-info-fg); }
.callout-quote   { border-color: var(--cl-quote-bar);   background: var(--cl-quote-bg); font-style: italic; }
.callout-quote   .callout-title { color: var(--cl-quote-fg); font-style: normal; }

/* ==highlighted text== */
mark { background: var(--mark-bg); color: inherit; border-radius: var(--radius-sm); padding: 0 .15em; }

/* Image captions / figures */
figure {
  margin: var(--s-5) 0;
  text-align: center;
}
figure img { border-radius: var(--radius); }
figcaption {
  margin-top: var(--s-2);
  font-size: var(--fs-xs);
  color: var(--muted);
  font-style: italic;
}

/* Heading anchor  ¶  */
.heading-anchor-icon {
  display: inline-block;
  margin-left: .4em;
  font-size: .7em;
  opacity: 0;
  color: var(--muted);
  text-decoration: none;
  transition: opacity .15s;
  vertical-align: middle;
}
h1:hover .heading-anchor-icon,
h2:hover .heading-anchor-icon,
h3:hover .heading-anchor-icon,
h4:hover .heading-anchor-icon { opacity: 1; }
a.header-anchor { text-decoration: none; color: inherit; }

/* Footnotes */
.footnotes {
  margin-top: var(--s-8);
  padding-top: var(--s-4);
  border-top: 1px solid var(--border);
  font-size: var(--fs-xs);
  color: var(--muted);
}
.footnotes ol { padding-left: 1.4em; }
.footnotes li { margin-bottom: var(--s-1); }
sup.footnote-ref a { color: var(--accent); text-decoration: none; font-size: .75em; vertical-align: super; }

/* ── Inline image captions  (*italic after image*) ───────────────────────── */
.img-figure {
  margin: var(--s-5) 0;
  text-align: center;
}
.img-figure img { border-radius: var(--radius); }
.img-caption {
  display: block;
  margin-top: var(--s-2);
  font-size: var(--fs-sm);
  color: var(--muted);
  font-style: italic;
  text-align: center;
}

/* ── Search ──────────────────────────────────────────────────────────────── */
.search-form {
  display: flex;
  gap: 0;
  margin: var(--s-6) 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
}
.search-form input[type="search"] {
  flex: 1;
  padding: var(--s-3) var(--s-4);
  font-size: var(--fs-base);
  font-family: var(--font-ui);
  border: none;
  background: transparent;
  color: var(--text);
  outline: none;
  -webkit-appearance: none;
}
.search-form button {
  padding: var(--s-3) var(--s-5);
  font-size: var(--fs-sm);
  font-family: var(--font-ui);
  font-weight: 500;
  background: transparent;
  color: var(--muted);
  border: none;
  border-left: 1px solid var(--border);
  cursor: pointer;
  letter-spacing: .01em;
  transition: color .15s;
}
.search-form button:hover { color: var(--text); }
.page-title    { display: none; }
.page-header-simple h1 { display: none; }
.search-count  { color: var(--muted); margin-bottom: var(--s-5); }
.search-empty  { color: var(--muted); }

/* ── Contact ─────────────────────────────────────────────────────────────── */
.contact-wrap { max-width: 520px; margin: 0 auto; }

.contact-field { margin-bottom: var(--s-4); }
.contact-field label {
  display: block;
  font-size: var(--fs-sm);
  font-family: var(--font-ui);
  font-weight: 500;
  color: var(--muted);
  margin-bottom: var(--s-1);
  letter-spacing: .01em;
}
.contact-field input,
.contact-field textarea {
  width: 100%;
  padding: var(--s-3) var(--s-4);
  font-size: var(--fs-base);
  font-family: var(--font-ui);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  box-sizing: border-box;
  -webkit-appearance: none;
  transition: border-color .15s;
}
.contact-field input:focus,
.contact-field textarea:focus { border-color: var(--accent); }
.contact-field textarea { resize: vertical; min-height: 140px; }

.contact-submit {
  padding: var(--s-3) var(--s-5);
  font-size: var(--fs-sm);
  font-family: var(--font-ui);
  font-weight: 600;
  background: #1f1b16;
  color: #f5f1ea;
  border: 1px solid #1f1b16;
  border-radius: var(--radius-sm);
  cursor: pointer;
  letter-spacing: .01em;
  transition: opacity .15s;
}
.contact-submit:hover { opacity: .8; }

/* ── Video ───────────────────────────────────────────────── */
.video-wrap {
  margin: var(--s-5) 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}
.video-wrap video { width: 100%; display: block; max-height: 70vh; }

/* ── Cards masonry view (/cards) ─────────────────────────── */
.cards-month { margin-bottom: var(--s-6); }
.cards-month-label {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  padding: var(--s-3) 0 var(--s-2);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--s-3);
}
.cards-grid {
  padding-bottom: var(--s-3);
}
.card-tile {
  display: block;
  break-inside: avoid;
  overflow: hidden;
  border-radius: 4px;
  position: relative;
  cursor: pointer;
  text-decoration: none;
  background: var(--border);
}
@media (max-width: 480px) { .card-tile { border-radius: 0; margin-bottom: 4px; } }

.card-tile img {
  display: block; width: 100%; height: auto;
  opacity: 0; transition: opacity .3s;
}
.card-tile img.loaded { opacity: 1; }
.card-tile:hover img  { opacity: .92; }

.card-tile-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 2.5rem 1rem 1rem;
  background: linear-gradient(transparent, rgba(0,0,0,.62));
  transition: opacity .2s;
}
.card-tile:hover .card-tile-overlay { opacity: .85; }
.card-tile-date  { display: block; font-size: .68rem; color: rgba(255,255,255,.65); margin-bottom: .2rem; }
.card-tile-title { font-size: .95rem; font-weight: 600; color: #fff; line-height: 1.3; }
.card-tile-tag   {
  display: inline-block; margin-top: .4rem;
  font-size: .63rem; padding: 2px 8px; border-radius: 99px;
  background: rgba(255,255,255,.18); color: #fff;
  backdrop-filter: blur(4px);
}
