/* =========================================
 *   style.css — Brainyboo UI (clean, consolidated)
 *   Variante B: Article-Banner full-bleed (randlos)
 *   Media-Card: Mobile = Bild oben (full width, capped height),
 *               Desktop = Bild links
 *   ========================================= */

/* ---------- Design Tokens ---------- */
:root{
  --bg: #ffffff;
  --panel: #f7fafc;
  --panel-2: #f2f6f9;

  --text: #1d4052;        /* Brainyboo Blau */
  --muted: #5e7682;
  --brand: #fc8550;       /* Brainyboo Orange */
  --brand-2: #1d4052;     /* Brainyboo Blau */
  --accent: #fc8550;

  --ring: #e6edf2;
  --radius: 16px;
  --radius-inner: calc(var(--radius) - 6px);
  --shadow: 0 8px 24px rgba(29,64,82,.08);

  --bb-btn-offset:16px;

  /* Breakpoints (nur als Doku; nicht in MQ benutzen) */
  --bp-sm:700px;
  --bp-md:900px;
  --bp-lg:1200px;
}

/* ---------- Base ---------- */
*{ box-sizing: border-box }
html,body{ height:100% }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  color:var(--text);
  background: var(--bg);
  accent-color: var(--brand);
}
a{ color:inherit; text-decoration:none }
img{ max-width:100%; display:block }
.visually-hidden{
  position:absolute!important; height:1px; width:1px; overflow:hidden;
  clip:rect(1px,1px,1px,1px); white-space:nowrap
}

/* ---------- Header ---------- */
.header{
  position:sticky; top:0; z-index:40;
  backdrop-filter: saturate(120%) blur(6px);
  background: rgba(255,255,255,0.5);
  border-bottom:1px solid var(--ring);
}
.header__inner{
  display:flex; align-items:center; gap:16px;
  padding:14px clamp(14px, 4vw, 28px);
  max-width:1400px; margin:0 auto;
}
.logo{ display:flex; align-items:center; }
.logo img{ display:block; max-height:80px; height:auto; width:auto; }
@media (min-width: 1200px){ .logo img{ max-height:80px } }

.search{ flex:1 1 auto; max-width:720px; position:relative; }
.search input{
  width:100%; padding:12px 40px 12px 14px; border-radius:12px;
  border:1px solid var(--ring); background:#fff; color:var(--text);
  outline:none; box-shadow:none; transition: border-color .2s ease, box-shadow .2s ease;
}
.search svg{ position:absolute; right:12px; top:50%; transform:translateY(-50%); opacity:.7 }

.header__actions{ display:flex; gap:10px }
.btn{
  display:inline-flex; align-items:center; gap:8px; height:50px; padding:0 14px;
  border-radius:12px; background:#fff; border:1px solid var(--ring); color:var(--text);
  transition: background-color .15s ease, box-shadow .15s ease, transform .03s ease;
}
.btn--primary{ background:linear-gradient(180deg, var(--brand), #f56f32); color:#fff; border-color: var(--brand) }
.btn:hover{ background:#f7fafc }
.btn:active{ transform: translateY(1px) }
.btn:focus-visible{ outline:2px solid var(--brand); outline-offset:3px }

/* ---------- Layout ---------- */
.layout{
  display:grid; grid-template-columns: 280px minmax(0,1fr); gap:24px;
  max-width:1400px; margin:24px auto; padding:0 clamp(14px, 4vw, 28px);
}

/* ---------- Sidebar ---------- */
.sidebar{ position:relative; }
.sidebar svg { width: 1.25rem; height: 1.25rem; }
.sidebar svg, .sidebar svg * { fill: none; }
.sidebar a { color: #1d4052; }           /* banoo.boo Blau */
.sidebar a.active { color: #fc8550; }    /* banoo.boo Orange */

.sidebar__inner{ position:sticky; top:84px; display:flex; flex-direction:column; gap:8px; }
.nav{
  background:linear-gradient(180deg, var(--panel), var(--panel-2));
  border:1px solid var(--ring); border-radius:var(--radius); padding:10px; box-shadow:var(--shadow);
}
.nav a{
  display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:12px; color:var(--text);
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.nav a:hover,
.nav a:focus-visible{
  background:var(--brand);
  color:#0b0d10;                 /* hoher Kontrast auf Orange */
  border-color: rgba(0,0,0,.08);
  outline:none;
}
.nav a[aria-current="page"]{ background:#fff; color:var(--text); border:1px solid var(--ring) }
.nav svg{ opacity:.9 }

/* ---------- Content Grid (Image Tiles) ---------- */
.grid{
  display:grid; gap:18px; align-content:start;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.tile{
  position:relative; border-radius:var(--radius); overflow:hidden;
  min-height:clamp(260px, 35vh, 380px); isolation:isolate;
  background:#fff; border:1px solid var(--ring); box-shadow:var(--shadow);
}
/* Legacy-Alias: alte Inline-Styles mit --bg auf --tile-bg mappen */
.tile[style*="--bg:"]{ --tile-bg: var(--bg); }

.tile::before{
  content:""; position:absolute; inset:0; z-index:0; transition: transform .5s ease;
  background-image:
  linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,.28) 80%, rgba(0,0,0,.45) 100%),
  var(--tile-bg, none);
  background-position: center, center;
  background-size: cover, cover;
  background-repeat: no-repeat, no-repeat;
}
.tile:hover::before{ transform: scale(1.05) }

.tile__badge{
  position:absolute; top:10px; left:10px; z-index:2; padding:6px 10px; font-size:12px; letter-spacing:.3px;
  border-radius:999px; background:rgba(255,255,255,.9); color:var(--brand-2); backdrop-filter: blur(6px);
  border:1px solid var(--ring);
}
.tile__title{
  position:absolute; inset:auto 12px 12px 12px; z-index:2; font-weight:700; line-height:1.25;
  font-size: clamp(20px, 1.6vw + 10px, 24px);
  color: var(--brand-2);
  background: rgba(255,255,255,.8);
  backdrop-filter: blur(16px);
  opacity: .8;
  padding: 10px 12px; border-radius: var(--radius-inner); border: 1px solid var(--ring);
  text-shadow: none;
}
.tile__number{
  position:absolute; top:0; right:10px; z-index:2; padding:6px; font-size:150px; font-weight:bold;
  color:rgba(255,255,255,.4);
}

.tile__link{ position:absolute; inset:0; z-index:3; border-radius:var(--radius); outline: none; box-shadow:none; }
.tile:focus-within{ outline:2px solid var(--brand); outline-offset:3px }

/* ===== Tile-Variante: Outline (ohne Hintergrundbild) ===== */
.tile--outline{
  /* erbt Basis-Stile von .tile */
  border: 2px solid var(--brand-2);   /* Banoo-Blau */
  background:#fff;
  box-shadow: var(--shadow);
  min-height: clamp(220px, 28vh, 320px);  /* etwas kleiner als Bild-Tiles */
  display:flex;
  border-radius: var(--radius);
}

/* Bild/Gradient von .tile komplett abschalten */
.tile--outline::before{
  content: none !important;
  display: none !important;
}

/* Inhalt innen */
.tile--outline .tile__content{
  position: relative;
  z-index: 1;
  padding: clamp(14px, 2vw, 18px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Überschrift im Content (statt absoluter .tile__title) */
.tile--outline .tile__title{
  position: static;
  inset: auto;
  background: none;
  border: 0;
  padding: 0;
  margin: 0 0 6px 0;
  color: var(--brand-2);
  font-weight: 800;
  font-size: clamp(18px, 1.2vw + 12px, 22px);
  line-height: 1.3;
  text-shadow: none;
}

/* Badge optional oben im Flow (nicht position:absolute) */
.tile--outline .tile__badge{
  position: static;
  align-self: flex-start;
  margin-bottom: 4px;
  background: var(--brand);
  color: #0b0d10;
}

/* Hover: dezente Aufhellung des Rahmens */
.tile--outline:hover{
  border-color: color-mix(in srgb, var(--brand-2) 85%, white 15%);
}

/* Link-Layer weiterhin die ganze Karte klickbar */
.tile--outline .tile__link{
  border-radius: var(--radius);
}



/* ---------- Article (full-width) ---------- */
.article{
  grid-column: 1 / -1;
  background:#fff; border:1px solid var(--ring); border-radius: var(--radius);
  padding: clamp(16px, 3vw, 40px); box-shadow: var(--shadow);
  margin-block-end: 18px;
}
.article h1{ margin:0 0 6px; font-size: clamp(28px, 2.2vw + 12px, 44px); color: var(--brand-2) }
.article .meta{ color: var(--muted); font-size: 14px; margin-bottom: 14px }
.article p{ line-height:1.7; color:#213f50 }

/* ---------- Article: Bild-Banner (Full-bleed, randlos) ---------- */
.article--bleed{
  --article-pad: clamp(16px, 3vw, 40px);
  padding: 0 var(--article-pad) var(--article-pad);
  overflow: hidden;
  border-radius: var(--radius);
}
.article__banner{
  margin: 0 0 20px 0;
  display: block;
  height: 200px;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
  width: calc(100% + (var(--article-pad) * 2));
  transform: translateX(calc(var(--article-pad) * -1));
}
.article__banner img{
  display:block; width:100%; height:100%;
  object-fit:cover; object-position:center;
}

/* ---------- Article Detail (after click) ---------- */
.article--detail{
  grid-column: 1 / -1; background:#fff; border:1px solid var(--ring); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: clamp(20px, 4vw, 48px);
}
.article--detail .content{ max-width: 72ch; margin-inline: auto }
.article--detail h1{ font-size: clamp(30px, 2.6vw + 12px, 48px); line-height:1.15; margin: 0 0 .5em; color: var(--brand-2) }
.article--detail h2{ font-size: clamp(22px, 1.2vw + 14px, 30px); margin: 1.6em 0 .6em; color:#0b2a3a }
.article--detail h3{ font-size: clamp(18px, .9vw + 12px, 22px); margin: 1.2em 0 .4em; color:#13384a }
.article--detail p, .article--detail li{ color:#213f50; line-height:1.75 }
.article--detail .lead{ font-size: clamp(18px, .8vw + 14px, 22px); color:#274657 }
.article--detail img, .article--detail figure{ width:100%; height:auto; border-radius:12px }
.article--detail figure{ margin: 1.2em 0 }
.article--detail figcaption{ color: var(--muted); font-size: 13px; margin-top: 6px }
.article--detail blockquote{ margin: 1.2em 0; padding: 12px 16px; background:#f8fbfd; border-left:4px solid var(--brand); color:#153c4e; border-radius:12px }
.article--detail code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  background:#f6f9fb; border:1px solid var(--ring); border-radius:6px; padding:.1em .3em
}
.article--detail pre{ background:#0f141a0a; border:1px solid var(--ring); padding:14px; border-radius:12px; overflow:auto }
.article--detail hr{ border:0; border-top:1px solid var(--ring); margin: 24px 0 }
.article--detail a{ color: var(--brand-2); text-decoration: underline }
.article--detail .meta{ color: var(--muted); font-size: 14px; margin: .6em 0 1.2em }
.article--detail .scroll{ overflow:auto; border:1px solid var(--ring); border-radius:12px; background:#fff }
.article--detail table{ width:100%; border-collapse: collapse }
.article--detail th, .article--detail td{ padding:10px 12px; border-bottom:1px solid var(--ring); text-align:left }
.article--detail thead th{ position:sticky; top:0; background:#f6f9fb }


/* ===== Articles Box (compact list) ===== */
.articles-box{
  border:1px solid var(--ring);
  border-radius: var(--radius);
  background:#fff;
  box-shadow: var(--shadow);
  padding: clamp(12px, 2vw, 16px);
  margin-block: 0 clamp(14px, 2.5vw, 24px);
}

.articles-box__head{
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom: 6px;
}
.articles-box__title{
  margin:0;
  font-weight:800;
  color: var(--brand-2);
  font-size: clamp(16px, 1vw + 12px, 20px);
}

.articles-list{
  list-style:none; margin:0; padding:0;
  display:grid; gap:10px;
}
.articles-list > li{
  padding-top:10px;
  border-top:1px solid var(--ring);
}
.articles-list > li:first-child{
  border-top:0; padding-top:0;
}

/* eine Artikelzeile */
.article-row{
  display:grid; grid-template-columns: auto 1fr; gap:12px; align-items:center;
}

/* Thumbnail ~ 2x2 cm (mit pixeligem Fallback per var) */
.article-row__thumb{
  /* Fallback-Variable, falls du lieber Pixel willst: */
  --thumb: 3cm; /* ~76px auf 96dpi */
  inline-size: var(--thumb);
  block-size: var(--thumb);
  border-radius: 12px;
  overflow:hidden;
  background:#f3f6f9;
  border:1px solid var(--ring);
  vertical-align: top;
}

.article-row__thumb_big{
  /* Fallback-Variable, falls du lieber Pixel willst: */
  --thumb: 5cm; /* ~76px auf 96dpi */
  inline-size: var(--thumb);
  block-size: var(--thumb);
  border-radius: 12px;
  overflow:hidden;
  background:#f3f6f9;
  border:1px solid var(--ring);
  vertical-align: top;
}

.article-row__thumb a{ display:block; inline-size:100%; block-size:100%; }
.article-row__thumb img{
  width:100%; height:100%;
  object-fit:cover; object-position:center; display:block;
}
.article-row__thumb a:focus-visible{
  outline:2px solid var(--brand); outline-offset:2px;
}

/* Textseite */
.article-row__body{ display:flex; flex-direction:column; gap:4px; min-width:0 }
.article-row__title{
  margin:0;
  font-weight:700;
  color:#0b2a3a;
  font-size: clamp(14px, .9vw + 12px, 18px);
  line-height:1.3;
  overflow:hidden; text-overflow:ellipsis;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
}
.article-row__meta{ color: var(--muted); font-size:12px }
.article-row__excerpt{
  margin:0; color:#274657; font-size:14px; line-height:1.45;
  overflow:hidden; text-overflow:ellipsis;
  display:-webkit-box; -webkit-line-clamp:5; -webkit-box-orient:vertical;
}

/* Call-to-action Link */
.article-row__read{
  width:max-content; margin-top:2px;
  display:inline-flex; align-items:center; gap:6px;
  padding:4px 8px; border-radius:10px;
  background:#fff; color: var(--brand-2);
  border:1px solid var(--ring);
  text-decoration:none;
  font-size:13px; font-weight:600;
}
.article-row__read:hover{ background: var(--panel); border-color: var(--brand) }
.article-row__read:focus-visible{ outline:2px solid var(--brand); outline-offset:2px }

/* Mobile: etwas kompakter */
@media (max-width: 700px){
  .article-row{ gap:10px }
  .article-row__excerpt{ -webkit-line-clamp:5 }
}



/* ---------- Media Cards (image left, text right, max 2 per row) ---------- */
.listgrid{
  display:grid; gap:18px; grid-template-columns: repeat(2, minmax(0,1fr));
  margin-block: clamp(16px, 3vw, 32px);
}
.listgrid > *:only-child{ grid-column: 1 / -1 }
.listgrid:has(> *:only-child){ grid-template-columns: 1fr }
@media (max-width: 900px){
  .listgrid{ grid-template-columns: 1fr }
}

.media-card{
  position:relative; display:grid; grid-template-columns: minmax(160px, 240px) 1fr; gap:14px; align-items:stretch;
  background:#fff; border:1px solid var(--ring); border-radius:var(--radius); box-shadow: var(--shadow);
  padding: clamp(10px, 1.2vw, 14px); overflow:hidden;
  transition: transform .06s ease, box-shadow .15s ease, border-color .15s ease;
}
.media-card:focus-within{ outline:2px solid var(--brand); outline-offset:3px }
.media-card :where(h3, p, .meta){ margin:0 }

.media-card__img{
  position:relative; width:100%; background:#f3f6f9; overflow:hidden; border-radius:var(--radius-inner);
}
.media-card__img img{ width:100%; height:100%; object-fit:cover; object-position:center; display:block }

.media-card__body{ display:flex; flex-direction:column; gap:8px; padding:0 }
.media-card__eyebrow{ font-size:12px; text-transform:uppercase; letter-spacing:.04em; color: var(--brand-2) }
.media-card__title{ margin:0; font-size: clamp(16px, 1.2vw + 10px, 20px); color:#0b2a3a; line-height:1.3 }
.media-card__meta{ color: var(--muted); font-size: 13px }
.media-card__excerpt{ color:#274657; line-height:1.55 }

.media-card__link{ position:absolute; inset:0; z-index:2; border-radius:inherit }

/* ===== Mobile-Layout: Bild OBEN (full width, capped height), Text darunter ===== */
@media (max-width: 700px){
  .media-card{
    grid-template-columns: 1fr;   /* eine Spalte */
    gap: 10px;
    align-items: start;
  }
  .media-card__img{
    grid-column: 1 / -1;
    width: 100%;
    height: clamp(160px, 45vw, 260px); /* flüssig + Max */
    aspect-ratio: auto;                /* Höhe steuern wir selbst */
    max-height: 260px;
    border-radius: var(--radius-inner);
    overflow: hidden;
  }
  .media-card__img img{
    width: 100%; height: 100%;
    object-fit: cover; object-position: center;
  }
  .media-card__body{
    grid-column: 1 / -1;
    padding: 0 2px 2px;
  }
}

/* ===== Desktop/Tablet: Bild links (wie gehabt) ===== */
@media (min-width: 701px){
  .media-card{ grid-template-columns: 200px 1fr; }
  .media-card__img{ aspect-ratio: auto; height: clamp(120px, 18vh, 180px); max-height: 200px; }
}

/* Size variants (optional, per card) */
.media-card--sm .media-card__img{ height:120px; aspect-ratio:auto }
.media-card--md .media-card__img{ height:160px; aspect-ratio:auto }
.media-card--lg .media-card__img{ height:200px; aspect-ratio:auto }

/* ---------- Banoo Tipp / Owl Callout ---------- */
.tip{
  display:grid;
  grid-template-columns: auto 1fr;
  gap:14px;
  align-items:center;
  padding: clamp(12px, 1.2vw, 16px);
  border: 2px solid var(--brand);
  border-radius: var(--radius);
  background:#fff;
  box-shadow: var(--shadow);
}
.tip__media{
  inline-size: clamp(64px, 7vw, 88px);
  block-size: clamp(64px, 7vw, 88px);
  border-radius: 12px;
  overflow:hidden;
  display:grid; place-items:center;
  background: #fff;
}
.tip__media img{
  width:100%; height:100%;
  object-fit: contain; object-position:center;
  display:block;
}
.tip__body{ display:flex; flex-direction:column; gap:6px }
.tip__title{ font-weight:700; color: var(--brand-2); margin:0 }
.tip__text{ margin:0; line-height:1.6; color:#213f50 }
.tip__text a{ color: var(--brand-2); text-decoration: underline }
.tip__badge{
  display:inline-flex; align-items:center; gap:8px;
  font-size:12px; letter-spacing:.02em;
  padding:4px 8px; border-radius:999px;
  background: var(--brand); color:#0b0d10;
  border:1px solid rgba(0,0,0,.06);
  width:max-content;
}

/* ---------- Brainyboo Listen (sitewide) ---------- */
:where(ul){
  font: inherit; color: var(--text);
  margin-block: 0 1rem;
  padding-inline-start: 1.25rem;
  line-height: 1.65;
  list-style: disc outside;
}
:where(ul) > li{ margin-block: .35em }
:where(ul) > li::marker{
  color: var(--brand);
  font-size: 1.2em;
}
:where(ul ul){
  margin-block: .3rem .5rem;
}
:where(ul ul) > li::marker{
  color: color-mix(in srgb, var(--brand) 80%, white 20%);
}
:where(ol){
  font: inherit; color: var(--text);
  margin-block: 0 1rem;
  padding-inline-start: 1.5rem;
  line-height: 1.65;
  list-style: decimal outside;
}
:where(ol) > li{ margin-block: .35em }
:where(ol) > li::marker{
  color: var(--brand-2);
  font-weight: 700;
}
.list--check{ list-style:none; padding-inline-start:0 }
.list--check > li{ position:relative; margin-block:.4em; padding-inline-start:1.7rem; }
.list--check > li::before{
  content:"✓"; position:absolute; inset-inline-start:0; inset-block-start:.1em;
  font-weight:800; color:var(--brand); inline-size:1.1rem; text-align:center;
}
.list--dividers > li + li{ border-top:1px solid var(--ring); padding-block-start:.5em; margin-block-start:.5em; }
.list--compact > li{ margin-block:.2em; line-height:1.5 }
.list--spacious > li{ margin-block:.6em; line-height:1.75 }
.list--card{
  border:1px solid var(--ring); border-radius:var(--radius);
  padding:.75rem 1rem; background:#fff; box-shadow:var(--shadow);
}
/* Navigation/Breadcrumbs nicht als Content-Listen stylen */
nav :where(ul), .nav :where(ul), .menu :where(ul), .breadcrumbs :where(ul), .pagination :where(ul){
  list-style:none; margin:0; padding:0;
}
nav :where(li), .nav :where(li), .menu :where(li), .breadcrumbs :where(li), .pagination :where(li){ margin:0; }
nav :where(li)::marker, .nav :where(li)::marker, .menu :where(li)::marker, .breadcrumbs :where(li)::marker, .pagination :where(li)::marker{ content:""; }


/* ===== Bild mit Textumlauf (für Artikel/Prosa) ===== */

/* Der umgebende Block (z. B. .article .content) kapselt Floats automatisch */
.prose, .article, .article .content { display: flow-root; }

/* Basis: Bilder responsiv halten */
img {
  max-width: 100%;
  height: auto;
}

/* Float-Helfer */
.img-right {
  float: right;
  margin: 0.2rem 0 0.6rem 1rem;
  border-radius: 12px;
  display: block;
}

.img-left {
  float: left;
  margin: 0.2rem 1rem 0.6rem 0;
  border-radius: 12px;
  display: block;
}

/* iOS-Safari-Stabilisierung:
   Absatz, der das Float-Bild enthält, sicher als normaler Block + Clearfix */
p:has(> .img-right),
p:has(> .img-left) {
  display: block !important;
  overflow: visible !important;
  contain: none !important;
  -webkit-line-clamp: initial !important;
  line-clamp: initial !important;
  -webkit-box-orient: initial !important;
}

p:has(> .img-right)::after,
p:has(> .img-left)::after {
  content: "";
  display: table;
  clear: both;
}

/* Optional: Clearfix für Wrapper, falls Bild NICHT im <p> liegt */
.clearfix::after,
.lead::after {
  content: "";
  display: table;
  clear: both;
}

/* Sicherheitsnetz: Absatz im Artikel nicht als Flex/Grid rendern */
.article p {
  display: block !important;
}

/* Captions hübsch machen, wenn <figure> genutzt wird */
.figure {
  display: inline-block;          /* bleibt im Flow */
  max-width: 100%;
}
.figure figcaption {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
  text-align: center;
}

/* Stack-Layout: jedes Folgeelement bekommt Abstand nach oben */
.stack{ --stack-gap: clamp(16px, 3vw, 28px); }
.stack > * + *{ margin-block-start: var(--stack-gap); }

/* Mobile: Floats aufheben -> Bild vollbreit über dem Text */
@media (max-width: 700px){
  .img-left,
  .img-right {
    float: none;
    display: block;
    max-width: 100%;
    margin: 0 0 0.8rem 0;
  }
}

/* ---------- Back Button ---------- */
.bb-back-btn{
  position:fixed; left:var(--bb-btn-offset); bottom:var(--bb-btn-offset);
  z-index:99999;
  width:2cm; height:2cm; border-radius:50%;
  border:1px solid var(--brand);
  display:grid; place-items:center;
  text-decoration:none;
  font-weight:700; font-size:0.6cm; line-height:1;
  color:var(--brand-2);
  background:rgba(255,255,255,.55);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  box-shadow:0 4px 16px rgba(0,0,0,.08);
  transition:transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.bb-back-btn:hover{ transform:translateY(-1px); box-shadow:0 6px 22px rgba(0,0,0,.12); }
.bb-back-btn:active{ transform:none; box-shadow:0 3px 10px rgba(0,0,0,.10); }
@supports not ((backdrop-filter:blur(8px)) or (-webkit-backdrop-filter:blur(8px))){
  .bb-back-btn{ background:rgba(255,255,255,.85); }
}
@media (prefers-reduced-motion: reduce){
  .bb-back-btn{ transition:none; }
}
@media print{ .bb-back-btn{ display:none; } }

/* ---------- Footer ---------- */
footer{
  max-width:1400px; margin:36px auto 80px;
  padding:0 clamp(14px, 4vw, 28px); color:var(--muted)
}

/* ---------- Mobile: off-canvas nav (CSS-only) ---------- */
#nav-toggle{ display:none }
.hamburger{ display:none; margin-right:2px }

@media (max-width: 980px){
  .layout{ grid-template-columns: 1fr }
  .sidebar__inner{
    position:fixed; inset:64px 0 0 0; padding:16px; transform: translateX(-100%);
    transition: transform .35s ease; background: linear-gradient(180deg, var(--panel), var(--panel-2));
    border-right:1px solid var(--ring); z-index:50
  }
  #nav-toggle:checked ~ .layout .sidebar__inner{ transform:none }
  .hamburger{ display:inline-flex }
  .header__inner{ justify-content:space-between }
}

/* ---------- Utilities / polish ---------- */
.chip{
  display:inline-flex; align-items:center; gap:8px; padding:6px 10px; border-radius:999px;
  background: linear-gradient(180deg, #10161d, #0d1319); border:1px solid var(--ring); color:var(--muted);
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce){
  *{ scroll-behavior:auto }
  .tile::before, .btn, .media-card{ transition:none }
}
