/* If-Thema My Base — demo layer only.
   Loaded on top of the theme output in the static showroom. It never overrides
   theme design tokens: it only adds the fixed demo navigator strip and makes
   the (JS-less) collapsed navigation show its links instead of a dead
   hamburger. The demo top page (/my-base/) also uses the .mbtop-* rules. */

/* ---------- keep the theme footer clear of the fixed strip ---------- */
html { scroll-padding-bottom: 64px; }
body { padding-bottom: 56px; }

/* Demo-environment safety net: the static bundle has no theme style.css on the
   front end (WordPress block themes do not auto-enqueue it — see the demo
   design note), so guard against any stray horizontal overflow without
   touching the theme's own layout. */
html { overflow-x: clip; }

/* ---------- demo navigator strip ---------- */
.mbdemo-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2147483000;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  padding: 8px 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.4;
  color: #e8eaed;
  background: rgba(18, 22, 28, 0.94);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: saturate(150%) blur(6px);
}
.mbdemo-bar a {
  color: #cdd3da;
  text-decoration: none;
  padding: 2px 6px;
  border-radius: 6px;
}
.mbdemo-bar a:hover,
.mbdemo-bar a:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}
.mbdemo-bar a[aria-current="true"] {
  color: #12161c;
  background: #e8eaed;
  font-weight: 700;
}
.mbdemo-bar__tag {
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #98d7c4;
}
.mbdemo-bar__group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.mbdemo-bar__k {
  color: #838d99;
  margin-right: 4px;
}
.mbdemo-bar__home,
.mbdemo-bar__product {
  margin-left: auto;
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.mbdemo-bar__product { margin-left: 0; }

@media (max-width: 640px) {
  .mbdemo-bar { font-size: 11px; gap: 4px 10px; padding: 7px 10px; }
  .mbdemo-bar__home,
  .mbdemo-bar__product { margin-left: 0; }
}

/* ---------- JS-less navigation: always show the links ---------- */
.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close { display: none !important; }
.wp-block-navigation__responsive-container,
.wp-block-navigation__responsive-container.is-menu-open {
  display: block !important;
  position: static !important;
  width: auto !important;
  height: auto !important;
  max-width: none !important;
  background: transparent !important;
  padding: 0 !important;
  z-index: auto !important;
  visibility: visible !important;
}
.wp-block-navigation__responsive-close,
.wp-block-navigation__responsive-dialog { position: static !important; }
.wp-block-navigation__responsive-container .wp-block-navigation__container {
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px 18px;
}

/* ---------- demo top page (/my-base/) — the showroom ---------- */
.mbtop {
  --mbtop-bg: #f4f2ec;
  --mbtop-fg: #14181d;
  --mbtop-muted: #5b6675;
  --mbtop-line: rgba(20, 24, 29, 0.14);
  --mbtop-accent: #315edb;
  --mbtop-card-bg: #ffffff;
  --mbtop-shot-bg: #e9e7df;
  --mbtop-yes: #1c7a55;
  --mbtop-no: #a2432f;
  margin: 0;
  padding: 0 0 72px;
  color: var(--mbtop-fg);
  background: var(--mbtop-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.7;
}
.mbtop .shell { width: min(1100px, calc(100% - 40px)); margin: 0 auto; }
.mbtop-header { padding: 56px 0 8px; }
.mbtop-kicker {
  margin: 0 0 10px;
  color: var(--mbtop-accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.mbtop-header h1 {
  margin: 0;
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  letter-spacing: -0.04em;
  line-height: 1.08;
}
.mbtop-lead { margin: 16px 0 0; max-width: 64ch; color: var(--mbtop-muted); }
.mbtop-lead a,
.mbtop-note a { color: var(--mbtop-accent); font-weight: 700; }

.mbtop-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 0;
}
.mbtop-btn {
  display: inline-block;
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--mbtop-accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 120ms ease, opacity 120ms ease;
}
.mbtop-btn:hover,
.mbtop-btn:focus-visible { transform: translateY(-1px); outline: none; opacity: 0.94; }
.mbtop-btn--ghost {
  background: transparent;
  color: var(--mbtop-accent);
  border-color: var(--mbtop-line);
}

.mbtop-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin: 22px 0 0;
  font-size: 0.82rem;
}
.mbtop-jump a {
  padding: 4px 10px;
  border: 1px solid var(--mbtop-line);
  border-radius: 999px;
  color: var(--mbtop-muted);
  text-decoration: none;
}
.mbtop-jump a:hover,
.mbtop-jump a:focus-visible { color: var(--mbtop-accent); border-color: var(--mbtop-accent); outline: none; }

.mbtop-note {
  margin: 24px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--mbtop-line);
  border-left: 3px solid var(--mbtop-accent);
  border-radius: 12px;
  background: rgba(245, 248, 255, 0.6);
  font-size: 0.88rem;
  color: var(--mbtop-muted);
}

.mbtop-section { padding: 40px 0 0; }
.mbtop-section > h2 {
  margin: 0 0 4px;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}
.mbtop-section > p { margin: 0 0 18px; color: var(--mbtop-muted); font-size: 0.95rem; max-width: 68ch; }
.mbtop-section > p strong { color: var(--mbtop-fg); }

/* 4-step how-to */
.mbtop-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  counter-reset: none;
}
.mbtop-steps li {
  padding: 16px;
  border: 1px solid var(--mbtop-line);
  border-radius: 12px;
  background: var(--mbtop-card-bg);
}
.mbtop-steps__n {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--mbtop-accent);
}
.mbtop-steps__t { display: block; margin: 6px 0 4px; font-weight: 700; font-size: 0.98rem; }
.mbtop-steps__d { display: block; font-size: 0.86rem; color: var(--mbtop-muted); line-height: 1.6; }

/* demo vs ZIP */
.mbtop-diff {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.mbtop-diff__col {
  padding: 16px 18px;
  border: 1px solid var(--mbtop-line);
  border-radius: 12px;
  background: var(--mbtop-card-bg);
}
.mbtop-diff__col h3 {
  margin: 0 0 8px;
  font-size: 0.92rem;
  padding-left: 16px;
  position: relative;
}
.mbtop-diff__col h3::before {
  position: absolute;
  left: 0;
  font-weight: 700;
}
.mbtop-diff__col--no h3 { color: var(--mbtop-no); }
.mbtop-diff__col--no h3::before { content: "×"; }
.mbtop-diff__col--yes h3 { color: var(--mbtop-yes); }
.mbtop-diff__col--yes h3::before { content: "✓"; }
.mbtop-diff__col ul { margin: 0; padding-left: 1.1em; font-size: 0.88rem; color: var(--mbtop-muted); }
.mbtop-diff__col li { margin: 3px 0; }
.mbtop-diff__note { margin: 10px 0 0; font-size: 0.82rem; color: var(--mbtop-muted); }

/* style-by-style comparison strip */
.mbtop-compare { display: grid; gap: 10px; }
.mbtop-compare__row {
  display: grid;
  grid-template-columns: 64px repeat(3, 1fr);
  gap: 10px;
  align-items: center;
}
.mbtop-compare__label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mbtop-muted);
}
.mbtop-compare__row a {
  display: block;
  border: 1px solid var(--mbtop-line);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  background: var(--mbtop-shot-bg);
  transition: border-color 120ms ease, transform 120ms ease;
}
.mbtop-compare__row a:hover,
.mbtop-compare__row a:focus-visible { border-color: var(--mbtop-accent); transform: translateY(-1px); outline: none; }
.mbtop-compare__row img {
  display: block;
  width: 100%;
  height: auto;           /* neutralise the height="" attr so aspect-ratio wins */
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: top;
}
.mbtop-compare__row a span {
  display: block;
  padding: 5px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--mbtop-muted);
  border-top: 1px solid var(--mbtop-line);
}

/* the 12 screenshot cards */
.mbtop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}
.mbtop-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--mbtop-line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--mbtop-card-bg);
  color: inherit;
  text-decoration: none;
  transition: border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}
.mbtop-card:hover,
.mbtop-card:focus-visible {
  border-color: var(--mbtop-accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -16px rgba(20, 24, 29, 0.5);
  outline: none;
}
.mbtop-card__shot {
  display: block;
  width: 100%;
  height: auto;           /* neutralise the height="" attr so aspect-ratio wins */
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: top;
  background: var(--mbtop-shot-bg);
  border-bottom: 1px solid var(--mbtop-line);
}
.mbtop-card__body { display: block; padding: 14px 16px 16px; }
.mbtop-card__meta {
  display: block;
  margin-bottom: 6px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--mbtop-accent);
}
.mbtop-card__meta .s { color: var(--mbtop-muted); }
.mbtop-card__title { display: block; margin: 0 0 5px; font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; }
.mbtop-card__desc { display: block; font-size: 0.88rem; color: var(--mbtop-muted); line-height: 1.62; }
.mbtop-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.mbtop-card__tags span {
  font-size: 0.72rem;
  color: var(--mbtop-muted);
  border: 1px solid var(--mbtop-line);
  border-radius: 999px;
  padding: 2px 9px;
}
.mbtop-card__go {
  display: block;
  margin-top: 10px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--mbtop-accent);
}

.mbtop-section--end { text-align: left; }

.mbtop-foot {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--mbtop-line);
  font-size: 0.85rem;
  color: var(--mbtop-muted);
}
.mbtop-foot a { color: var(--mbtop-accent); font-weight: 700; }

@media (max-width: 720px) {
  .mbtop-header { padding-top: 40px; }
  .mbtop-compare__row { grid-template-columns: 1fr 1fr 1fr; }
  .mbtop-compare__label { grid-column: 1 / -1; margin-bottom: -4px; }
}

@media (prefers-color-scheme: dark) {
  .mbtop {
    --mbtop-bg: #14181d;
    --mbtop-fg: #e8eaed;
    --mbtop-muted: #9aa4b0;
    --mbtop-line: rgba(255, 255, 255, 0.16);
    --mbtop-accent: #7aa2ff;
    --mbtop-card-bg: #1b2027;
    --mbtop-shot-bg: #232a33;
    --mbtop-yes: #56c596;
    --mbtop-no: #e08a72;
  }
  .mbtop-note { background: rgba(255, 255, 255, 0.04); }
  .mbtop-btn { color: #0f1216; }
  .mbtop-btn--ghost { color: var(--mbtop-accent); }
  .mbtop-card:hover,
  .mbtop-card:focus-visible { box-shadow: 0 10px 28px -18px rgba(0, 0, 0, 0.8); }
}

/* ---------- "how to rebuild this design" panel on each demo page ---------- */
/* Demo-layer only: injected by the snapshot after the theme's site wrapper, so
   it sits outside all theme markup. Uses its own dark demo-chrome palette so it
   reads consistently over Simple / Natural / Dark and is never mistaken for
   theme content. */
.mbdemo-howto {
  box-sizing: border-box;
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 22px 22px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.65;
  color: #e8eaed;
  background: #12161c;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
}
@media (min-width: 800px) {
  .mbdemo-howto { margin: 40px auto; }
}
.mbdemo-howto__h {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #98d7c4;
}
.mbdemo-howto__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 0 0 12px;
}
.mbdemo-howto__meta span {
  font-size: 12px;
  color: #cdd3da;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 2px 10px;
}
.mbdemo-howto ol { margin: 0; padding-left: 1.3em; }
.mbdemo-howto li { margin: 4px 0; }
.mbdemo-howto__foot {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 12.5px;
  color: #9aa4b0;
}
.mbdemo-howto__foot a {
  color: #e8eaed;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}
.mbdemo-howto__foot a:hover,
.mbdemo-howto__foot a:focus-visible { color: #fff; outline: none; }
