/* ==========================================================================
   LABS THEME — WORDPRESS EDITORIAL FOUNDATION v0.8.2

   Layer 1: Core WordPress editorial foundation
   Layer 2: Universal editorial composition styles
   Layer 3: Semantic migration hooks (still native core blocks)

   WordPress owns the document. This file only supplies presentation.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CORE EDITORIAL FOUNDATION
   -------------------------------------------------------------------------- */

:where(.labs-entry-content, .editor-styles-wrapper) {
  --labs-editorial-copy: min(100%, var(--labs-content-width, 760px));
  --labs-editorial-wide: min(100%, var(--labs-wide-width, 1320px));
  --labs-editorial-rule: var(--labs-border, rgba(127,127,127,.22));
  color: var(--labs-text, currentColor);
  font-size: 14px;
  line-height: 1.68;
}

:where(.labs-entry-content, .editor-styles-wrapper) :where(.wp-block-group,.wp-block-columns,.wp-block-column,.wp-block-image,.wp-block-gallery,.wp-block-table,.wp-block-buttons,.wp-block-embed,.wp-block-video,.wp-block-audio) {
  box-sizing: border-box;
  min-width: 0;
}

/* Typography + document rhythm ------------------------------------------ */
:where(.labs-entry-content, .editor-styles-wrapper) :where(p,ul,ol,blockquote,pre,figure,details) {
  margin-top: 0;
}
:where(.labs-entry-content, .editor-styles-wrapper) p { margin-bottom: 1.3em; }
:where(.labs-entry-content, .editor-styles-wrapper) :where(h2,h3,h4,h5,h6) {
  color: var(--labs-heading, currentColor);
  font-family: var(--labs-font-heading, inherit);
  font-weight: 650;
  text-wrap: balance;
}
:where(.labs-entry-content, .editor-styles-wrapper) h2 { margin: 2.25em 0 .65em; font-size: clamp(20px,1.65vw,24px); line-height: 1.16; letter-spacing: -.02em; }
:where(.labs-entry-content, .editor-styles-wrapper) h3 { margin: 1.9em 0 .6em; font-size: clamp(17px,1.25vw,19px); line-height: 1.2; letter-spacing: -.014em; }
:where(.labs-entry-content, .editor-styles-wrapper) h4 { margin: 1.7em 0 .55em; font-size: clamp(15px,1vw,17px); line-height: 1.25; letter-spacing: -.008em; }
:where(.labs-entry-content, .editor-styles-wrapper) h5 { margin: 1.55em 0 .5em; font-size: 14px; line-height: 1.3; }
:where(.labs-entry-content, .editor-styles-wrapper) h6 { margin: 1.5em 0 .5em; font-size: 13px; line-height: 1.3; }
:where(.labs-entry-content, .editor-styles-wrapper) :where(.wp-block-group,.wp-block-column) > :where(h2,h3,h4,h5,h6):first-child { margin-top: 0; }
:where(.labs-entry-content, .editor-styles-wrapper) :where(.has-small-font-size) { font-size: 12px !important; }
:where(.labs-entry-content, .editor-styles-wrapper) :where(figcaption,.wp-element-caption) { margin-top: 7px; color: var(--labs-dim,#7c8592); font-size: 11px; line-height: 1.45; text-align: left; }

/* Links ----------------------------------------------------------------- */
:where(.labs-entry-content, .editor-styles-wrapper) a:not(.wp-element-button) { color: var(--labs-link,#0284c7); text-decoration-thickness: 1px; text-underline-offset: .18em; }
:where(.labs-entry-content, .editor-styles-wrapper) a:not(.wp-element-button):hover { color: var(--labs-accent,#38bdf8); }

/* Lists ----------------------------------------------------------------- */
:where(.labs-entry-content, .editor-styles-wrapper) :where(ul,ol) { margin-bottom: 1.35em; padding-left: 1.35em; }
:where(.labs-entry-content, .editor-styles-wrapper) li { margin-block: .28em; padding-left: .12em; }
:where(.labs-entry-content, .editor-styles-wrapper) li::marker { color: var(--labs-muted,#7c8592); }

:where(.labs-entry-content, .editor-styles-wrapper) .wp-block-list.labs-link-list {
  margin: 0;
  padding: 0;
  overflow: hidden;
  list-style: none;
  border: 1px solid var(--labs-border,var(--labs-editorial-rule));
  border-radius: 3px;
  background: var(--labs-surface,rgba(127,127,127,.04));
}
:where(.labs-entry-content, .editor-styles-wrapper) .wp-block-list.labs-link-list > li {
  position: relative;
  margin: 0;
  padding: 10px 30px 10px 12px;
  border-bottom: 1px solid var(--labs-editorial-rule);
  font-size: 12px;
  line-height: 1.45;
}
:where(.labs-entry-content, .editor-styles-wrapper) .wp-block-list.labs-link-list > li::after {
  content: "";
  position: absolute;
  top: 13px;
  right: 13px;
  width: 5px;
  height: 5px;
  border-right: 1px solid var(--labs-dim,#7c8592);
  border-bottom: 1px solid var(--labs-dim,#7c8592);
  transform: rotate(-45deg);
}
:where(.labs-entry-content, .editor-styles-wrapper) .wp-block-list.labs-link-list > li:last-child { border-bottom:0; }
:where(.labs-entry-content, .editor-styles-wrapper) .wp-block-list.labs-link-list a {
  color: var(--labs-heading,currentColor);
  text-decoration: none;
}
:where(.labs-entry-content, .editor-styles-wrapper) .wp-block-list.labs-link-list a:hover,
:where(.labs-entry-content, .editor-styles-wrapper) .wp-block-list.labs-link-list a:focus-visible {
  color: var(--labs-accent,#38bdf8);
}

:where(.labs-entry-content, .editor-styles-wrapper) .wp-block-list.labs-compact-list {
  margin: 0;
  padding-left: 1.25em;
  font-size: 12px;
  line-height: 1.48;
}
:where(.labs-entry-content, .editor-styles-wrapper) .wp-block-list.labs-compact-list > li {
  margin-block: .2em;
  padding-left: .08em;
}

/* Images, captions, galleries + native lightbox ------------------------ */
:where(.labs-entry-content, .editor-styles-wrapper) :where(.wp-block-image,.wp-block-gallery,.wp-block-video,.wp-block-audio,.wp-block-embed) { margin-block: 1.55rem; }
:where(.labs-entry-content, .editor-styles-wrapper) .wp-block-image img,
:where(.labs-entry-content, .editor-styles-wrapper) .wp-block-gallery .wp-block-image img { display:block; max-width:100%; height:auto; border-radius:2px; }
:where(.labs-entry-content, .editor-styles-wrapper) .wp-block-gallery { gap: 6px; }
:where(.labs-entry-content, .editor-styles-wrapper) .wp-block-gallery.has-nested-images figure.wp-block-image { margin:0 !important; }
:where(.labs-entry-content, .editor-styles-wrapper) .wp-lightbox-container .lightbox-trigger { width:30px; height:30px; padding:0; display:grid; place-items:center; border:1px solid rgba(255,255,255,.30); border-radius:2px; background:rgba(4,7,10,.60); color:#fff; box-shadow:none; backdrop-filter:blur(6px); }
:where(.labs-entry-content, .editor-styles-wrapper) .wp-lightbox-container .lightbox-trigger svg { width:16px; height:16px; }
:where(.labs-entry-content, .editor-styles-wrapper) .wp-lightbox-container .lightbox-trigger:hover,
:where(.labs-entry-content, .editor-styles-wrapper) .wp-lightbox-container .lightbox-trigger:focus-visible { border-color:var(--labs-accent,#38bdf8); background:rgba(4,7,10,.80); outline:none; }

/* Multi-image galleries get one clear launcher while still using Core lightbox. */
:where(.labs-entry-content) .wp-block-gallery.labs-gallery-launcher-ready { position:relative; }
:where(.labs-entry-content) .wp-block-gallery.labs-gallery-launcher-ready .lightbox-trigger {
  opacity:0;
  pointer-events:none;
}
.labs-gallery-launcher {
  position:absolute;
  right:12px;
  bottom:12px;
  z-index:4;
  min-height:30px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 11px;
  border:1px solid rgba(255,255,255,.28);
  border-radius:2px;
  background:rgba(4,7,10,.76);
  color:#fff;
  box-shadow:none;
  backdrop-filter:blur(8px) saturate(120%);
  font-family:var(--labs-font-mono,monospace);
  font-size:10px;
  font-weight:700;
  line-height:1;
  letter-spacing:.065em;
  text-transform:uppercase;
  cursor:pointer;
}
.labs-gallery-launcher:hover,
.labs-gallery-launcher:focus-visible {
  border-color:var(--labs-accent,#38bdf8);
  background:rgba(4,7,10,.92);
  color:var(--labs-accent,#38bdf8);
  outline:none;
}
.labs-gallery-launcher svg { width:14px; height:14px; flex:none; }
.labs-gallery-launcher-count { color:rgba(255,255,255,.72); }
.labs-gallery-launcher:hover .labs-gallery-launcher-count,
.labs-gallery-launcher:focus-visible .labs-gallery-launcher-count { color:currentColor; }

/* Modal-origin galleries remain real native Gallery blocks, but are visually
   treated as one deliberate technical-media component. When the migrator finds
   one inside Cornerstone columns it promotes the whole gallery below that split
   layout so large image sets are never squeezed into a half-width column. */
:where(.labs-entry-content) .wp-block-gallery.labs-lightbox-gallery {
  position:relative;
  padding:6px;
  gap:6px;
  overflow:hidden;
  border:1px solid var(--labs-border,var(--labs-editorial-rule));
  border-radius:3px;
  background:var(--labs-surface,rgba(127,127,127,.04));
}
:where(.labs-entry-content) .wp-block-gallery.labs-lightbox-gallery .wp-block-image {
  overflow:hidden;
  border-radius:2px;
  background:var(--labs-surface-muted,rgba(127,127,127,.05));
}
:where(.labs-entry-content) .wp-block-gallery.labs-lightbox-gallery .wp-block-image img {
  width:100%;
}
:where(.editor-styles-wrapper) .wp-block-gallery.labs-lightbox-gallery {
  outline:1px dashed color-mix(in srgb,var(--labs-accent,#38bdf8) 34%,transparent);
  outline-offset:4px;
}

/* WordPress owns the lightbox runtime; the Theme only supplies presentation. */
.wp-lightbox-overlay { color:#f8fafc; }
.wp-lightbox-overlay .scrim { background:rgba(4,7,10,.94); opacity:1; backdrop-filter:blur(8px) saturate(115%); }
.wp-lightbox-overlay .lightbox-image-container { box-sizing:border-box; }
.wp-lightbox-overlay .lightbox-image-container .wp-block-image img { border-radius:2px; }
.wp-lightbox-overlay :is(.wp-lightbox-close-button,.wp-lightbox-navigation-button-prev,.wp-lightbox-navigation-button-next),
.wp-lightbox-overlay :is(.wp-lightbox-close-button,.wp-lightbox-navigation-button-prev,.wp-lightbox-navigation-button-next):not(:hover):not(:active):not(.has-background) { min-width:38px; min-height:38px; width:38px; height:38px; padding:0; border:1px solid rgba(255,255,255,.18); border-radius:2px; background:rgba(10,14,20,.74); color:#fff; box-shadow:none; backdrop-filter:blur(10px) saturate(120%); }
.wp-lightbox-overlay :is(.wp-lightbox-close-button,.wp-lightbox-navigation-button-prev,.wp-lightbox-navigation-button-next):hover,
.wp-lightbox-overlay :is(.wp-lightbox-close-button,.wp-lightbox-navigation-button-prev,.wp-lightbox-navigation-button-next):focus-visible { padding:0; border:1px solid var(--labs-accent,#38bdf8); background:rgba(10,14,20,.94); color:var(--labs-accent,#38bdf8); outline:none; }
.wp-lightbox-overlay :is(.wp-lightbox-close-icon,.wp-lightbox-navigation-icon) svg { display:block; width:16px; height:16px; fill:currentColor; }
.wp-lightbox-overlay :is(.wp-lightbox-close-icon,.wp-lightbox-navigation-icon) svg [fill]:not([fill="none"]) { fill:currentColor; }
.wp-lightbox-overlay :is(.wp-lightbox-close-icon,.wp-lightbox-navigation-icon) svg [stroke]:not([stroke="none"]) { stroke:currentColor; }
.wp-lightbox-overlay :is(.wp-lightbox-close-text,.wp-lightbox-navigation-text) { color:currentColor; font-family:var(--labs-font-mono,monospace); font-size:11px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; }

@media (max-width:600px) {
  .wp-lightbox-overlay :is(.wp-lightbox-close-button,.wp-lightbox-navigation-button-prev,.wp-lightbox-navigation-button-next),
  .wp-lightbox-overlay :is(.wp-lightbox-close-button,.wp-lightbox-navigation-button-prev,.wp-lightbox-navigation-button-next):not(:hover):not(:active):not(.has-background) { width:36px; height:36px; min-width:36px; min-height:36px; }
}

/* Tables ---------------------------------------------------------------- */
:where(.labs-entry-content, .editor-styles-wrapper) .wp-block-table { margin-block:1.65rem; overflow-x:auto; border-top:1px solid var(--labs-border-strong,rgba(127,127,127,.32)); scrollbar-width:thin; }
.labs-entry-content .wp-block-table table,
.editor-styles-wrapper .wp-block-table table { width:100%; border:0; border-collapse:collapse; background:transparent; color:var(--labs-text,currentColor); font-size:13px; line-height:1.55; }
.labs-entry-content .wp-block-table th,
.labs-entry-content .wp-block-table td,
.editor-styles-wrapper .wp-block-table th,
.editor-styles-wrapper .wp-block-table td { padding:10px 9px; border:0; border-bottom:1px solid var(--labs-editorial-rule); background:transparent; text-align:left; vertical-align:top; }
.labs-entry-content .wp-block-table th,
.editor-styles-wrapper .wp-block-table th { color:var(--labs-heading,currentColor); font-family:var(--labs-font-mono,monospace); font-size:11px; font-weight:700; letter-spacing:.055em; text-transform:uppercase; }
:where(.labs-entry-content, .editor-styles-wrapper) .wp-block-table.is-style-stripes tbody tr:nth-child(odd) :where(td,th) { background:var(--labs-surface-muted,rgba(127,127,127,.045)); }

/* Quotes / pullquotes --------------------------------------------------- */
:where(.labs-entry-content, .editor-styles-wrapper) .wp-block-quote { margin:1.8rem 0; padding:.15rem 0 .15rem 18px; border:0; border-left:2px solid var(--labs-border-strong,rgba(127,127,127,.32)); color:var(--labs-muted,currentColor); font-size:14px; }
:where(.labs-entry-content, .editor-styles-wrapper) .wp-block-quote cite { display:block; margin-top:8px; color:var(--labs-dim,currentColor); font-size:11px; font-style:normal; }
:where(.labs-entry-content, .editor-styles-wrapper) .wp-block-pullquote { margin:2rem 0; padding:22px 0; border-block:1px solid var(--labs-editorial-rule); }
:where(.labs-entry-content, .editor-styles-wrapper) .wp-block-pullquote blockquote { margin:0; padding:0; border:0; color:var(--labs-heading,currentColor); font-size:clamp(17px,1.6vw,21px); line-height:1.42; }

/* Buttons --------------------------------------------------------------- */
:where(.labs-entry-content,.labs-widget,.editor-styles-wrapper) .wp-block-buttons { gap:8px; }
:where(.labs-entry-content,.labs-widget,.editor-styles-wrapper) :where(.wp-block-button__link,.wp-element-button,.wp-block-file__button) { min-height:30px; padding:8px 12px; border:1px solid var(--labs-heading,#111827); border-radius:2px; background:var(--labs-heading,#111827); color:var(--labs-bg,#fff); box-shadow:none; font-family:var(--labs-font-mono,monospace); font-size:10px; font-weight:700; line-height:1.2; letter-spacing:.07em; text-decoration:none; text-transform:uppercase; transition:border-color .14s ease,background-color .14s ease,color .14s ease; }
:where(.labs-entry-content,.labs-widget,.editor-styles-wrapper) :where(.wp-block-button__link,.wp-element-button,.wp-block-file__button):hover,
:where(.labs-entry-content,.labs-widget,.editor-styles-wrapper) :where(.wp-block-button__link,.wp-element-button,.wp-block-file__button):focus-visible { border-color:var(--labs-accent,#38bdf8); background:var(--labs-accent,#38bdf8); color:#061018; outline:none; }
:where(.labs-entry-content,.labs-widget,.editor-styles-wrapper) .wp-block-button.is-style-outline > :where(.wp-block-button__link,.wp-element-button) { border-color:var(--labs-border-strong,rgba(127,127,127,.32)); background:transparent; color:var(--labs-heading,currentColor); }
:where(.labs-entry-content,.labs-widget,.editor-styles-wrapper) .wp-block-button.is-style-outline > :where(.wp-block-button__link,.wp-element-button):hover { border-color:var(--labs-accent,#38bdf8); color:var(--labs-accent,#38bdf8); background:transparent; }

/* Forms / Search -------------------------------------------------------- */
:where(.labs-entry-content,.labs-widget,.editor-styles-wrapper) .wp-block-search { margin-block:1.5rem; }
:where(.labs-entry-content,.labs-widget,.editor-styles-wrapper) .wp-block-search__label,
:where(.labs-entry-content,.editor-styles-wrapper) label { display:block; margin:0 0 6px; color:var(--labs-heading,currentColor); font-size:12px; font-weight:650; line-height:1.3; }
:where(.labs-entry-content,.labs-widget,.editor-styles-wrapper) .wp-block-search__label { font-family:var(--labs-font-mono,monospace); font-size:11px; letter-spacing:.06em; text-transform:uppercase; }
:where(.labs-entry-content,.labs-widget,.editor-styles-wrapper) .wp-block-search__inside-wrapper { min-height:34px; display:flex; align-items:stretch; border:1px solid var(--labs-input-border,rgba(127,127,127,.28)); border-radius:2px; background:var(--labs-input-bg,transparent); overflow:hidden; }
:where(.labs-entry-content,.labs-widget,.editor-styles-wrapper) .wp-block-search__input { min-width:0; min-height:34px; margin:0; padding:7px 10px; border:0; border-radius:0; background:transparent; color:var(--labs-text,currentColor); box-shadow:none; outline:none; font-size:13px; }
:where(.labs-entry-content,.labs-widget,.editor-styles-wrapper) .wp-block-search__button { min-width:42px; min-height:34px; margin:0; padding:7px 11px; border:0; border-left:1px solid var(--labs-input-border,rgba(127,127,127,.28)); border-radius:0; background:var(--labs-control,rgba(127,127,127,.08)); color:var(--labs-heading,currentColor); box-shadow:none; font-family:var(--labs-font-mono,monospace); font-size:10px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; cursor:pointer; }
:where(.labs-entry-content,.labs-widget,.editor-styles-wrapper) .wp-block-search__button svg { width:16px; height:16px; }
:where(.labs-entry-content,.editor-styles-wrapper) :where(input[type=text],input[type=email],input[type=url],input[type=number],input[type=tel],input[type=password],input[type=date],input[type=datetime-local],input[type=search],select,textarea):not(.wp-block-search__input) { width:100%; max-width:100%; min-height:36px; padding:8px 10px; border:1px solid var(--labs-input-border,rgba(127,127,127,.28)); border-radius:2px; background:var(--labs-input-bg,transparent); color:var(--labs-text,currentColor); box-shadow:none; outline:none; font-size:13px; }
:where(.labs-entry-content,.editor-styles-wrapper) textarea { min-height:130px; resize:vertical; }
:where(.labs-entry-content,.editor-styles-wrapper) :where(input,select,textarea):focus { border-color:var(--labs-accent,#38bdf8); box-shadow:0 0 0 1px var(--labs-accent,#38bdf8); }

/* Code / preformatted --------------------------------------------------- */
:where(.labs-entry-content,.editor-styles-wrapper) :where(.wp-block-code,.wp-block-preformatted,pre) { overflow:auto; padding:14px 16px; border:1px solid var(--labs-editorial-rule); border-radius:2px; background:var(--labs-surface-muted,rgba(127,127,127,.05)); color:var(--labs-text,currentColor); font-family:var(--labs-font-mono,monospace); font-size:12px; line-height:1.6; }
:where(.labs-entry-content,.editor-styles-wrapper) :where(code,kbd,samp) { font-family:var(--labs-font-mono,monospace); font-size:.92em; }
:where(.labs-entry-content,.editor-styles-wrapper) p code,
:where(.labs-entry-content,.editor-styles-wrapper) li code { padding:.12em .28em; border:1px solid var(--labs-editorial-rule); border-radius:2px; background:var(--labs-surface-muted,rgba(127,127,127,.05)); }

/* Details --------------------------------------------------------------- */
:where(.labs-entry-content,.editor-styles-wrapper) .wp-block-details { margin-block:1.5rem; padding:12px 0; border-block:1px solid var(--labs-editorial-rule); font-size:13px; }
:where(.labs-entry-content,.editor-styles-wrapper) .wp-block-details summary { color:var(--labs-heading,currentColor); font-size:13px; font-weight:650; cursor:pointer; }
:where(.labs-entry-content,.editor-styles-wrapper) .wp-block-details summary::marker { color:var(--labs-accent,#38bdf8); }
:where(.labs-entry-content,.editor-styles-wrapper) .wp-block-details > :last-child { margin-bottom:0; }

/* Groups / Columns ------------------------------------------------------ */
:where(.labs-entry-content,.editor-styles-wrapper) .wp-block-columns { gap:clamp(16px,2.2vw,28px); margin-block:1.6rem; align-items:flex-start; }
:where(.labs-entry-content,.editor-styles-wrapper) .wp-block-column > :first-child { margin-top:0; }
:where(.labs-entry-content,.editor-styles-wrapper) .wp-block-column > :last-child { margin-bottom:0; }

/* Embeds / media -------------------------------------------------------- */
:where(.labs-entry-content,.editor-styles-wrapper) :where(.wp-block-embed__wrapper,.wp-block-video video) { max-width:100%; }
:where(.labs-entry-content,.editor-styles-wrapper) .wp-block-embed iframe { max-width:100%; }

/* File / separator / misc ---------------------------------------------- */
:where(.labs-entry-content,.editor-styles-wrapper) .wp-block-file { margin-block:1.35rem; padding:10px 0; border-block:1px solid var(--labs-editorial-rule); font-size:12px; }
:where(.labs-entry-content,.editor-styles-wrapper) .wp-block-separator { margin-block:2rem; border:0; border-top:1px solid var(--labs-editorial-rule); opacity:1; }
:where(.labs-entry-content,.editor-styles-wrapper) .wp-block-calendar { font-size:12px; }
:where(.labs-entry-content,.editor-styles-wrapper) .wp-block-calendar table { border-collapse:collapse; }

/* --------------------------------------------------------------------------
   2. UNIVERSAL EDITORIAL COMPOSITION LAYER
   -------------------------------------------------------------------------- */

.labs-pattern-kicker { margin:0 0 8px; color:var(--labs-accent,#38bdf8); font-family:var(--labs-font-mono,monospace); font-size:11px; font-weight:700; line-height:1.25; letter-spacing:.085em; text-transform:uppercase; }

.wp-block-group.is-style-labs-section { padding-block:clamp(20px,3vw,36px); }
.wp-block-group.is-style-labs-panel,
.wp-block-group.is-style-labs-technical-panel,
.wp-block-group.is-style-labs-feature { padding:clamp(16px,2.5vw,26px); border:1px solid var(--labs-editorial-rule); border-radius:3px; background:var(--labs-surface-raised,var(--labs-surface,rgba(127,127,127,.04))); }
.wp-block-group.is-style-labs-technical-panel { background:var(--labs-surface,var(--labs-surface-muted,rgba(127,127,127,.035))); }
.wp-block-group.is-style-labs-feature { padding-block:clamp(24px,4vw,46px); }

.wp-block-columns.is-style-labs-feature-columns,
.wp-block-columns.is-style-labs-media-copy { gap:clamp(20px,3vw,38px); align-items:center; }

.wp-block-image.is-style-labs-framed-media { overflow:hidden; border:1px solid var(--labs-editorial-rule); border-radius:3px; background:var(--labs-surface-muted,rgba(127,127,127,.04)); }
.wp-block-image.is-style-labs-wide-media,
.wp-block-gallery.is-style-labs-wide-media { width:100%; max-width:var(--labs-wide-width,1320px); }
.wp-block-gallery.is-style-labs-editorial-grid { gap:5px; }

.wp-block-table.is-style-labs-technical-table table { font-size:13px; }
.wp-block-table.is-style-labs-technical-table :where(th:first-child,td:first-child) { width:34%; min-width:145px; padding-right:20px; color:var(--labs-heading,currentColor); font-family:var(--labs-font-mono,monospace); font-size:11px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; }

.wp-block-quote.is-style-labs-callout { margin-inline:0; padding:14px 17px; border:0; border-left:2px solid var(--labs-accent,#38bdf8); background:var(--labs-surface-muted,rgba(127,127,127,.035)); color:var(--labs-text,currentColor); }
.wp-block-quote.is-style-labs-callout p:last-child { margin-bottom:0; }

.labs-pattern-media-placeholder { min-height:clamp(220px,32vw,430px); display:grid; place-items:center; color:var(--labs-dim,currentColor); text-align:center; }

/* --------------------------------------------------------------------------
   3. SEMANTIC MIGRATION / TECHNICAL COMPOSITIONS
   -------------------------------------------------------------------------- */

/* Single posts: prose stays readable while migrated media/data can use the
   full article column. No proprietary block types are introduced. */
.single-post .labs-entry { width:100%; max-width:none; }
.single-post .labs-entry-header { width:min(100%,var(--labs-content-width)); margin:0 0 clamp(26px,4vw,40px); }
.single-post .labs-entry-title { max-width:900px; font-size:clamp(28px,2.2vw,34px); line-height:1.1; letter-spacing:-.025em; }
.single-post .labs-entry-meta { margin-top:9px; font-size:11px; }
.single-post .labs-entry-content {
  --labs-post-section-gap:clamp(30px,4vw,44px);
  --labs-post-inner-gap:clamp(14px,1.7vw,20px);
  --labs-post-tight-gap:clamp(8px,1vw,12px);
  width:100%;
  max-width:none;
  font-size:14px;
}
.single-post .labs-entry-content :where(.wp-block-paragraph,.wp-block-list,.wp-block-heading,.wp-block-quote,.wp-block-pullquote,.wp-block-code,.wp-block-preformatted) { max-width:min(100%,var(--labs-content-width)); }
.single-post .labs-entry-content > :where(.wp-block-group,.labs-editorial-section) { width:100%; max-width:none; margin:0; }
.single-post .labs-entry-content > .labs-editorial-section { display:block; }
.single-post .labs-entry-content > .labs-editorial-section > * { margin-block-start:0; margin-block-end:0; }
.single-post .labs-entry-content > .labs-editorial-section > * + * { margin-block-start:var(--labs-post-inner-gap); }
.single-post .labs-entry-content > .labs-editorial-section > :where(h2,h3,h4,.wp-block-heading) + :where(p,.wp-block-paragraph,.wp-block-list) { margin-block-start:var(--labs-post-tight-gap); }
.single-post .labs-entry-content > .labs-editorial-section > :where(p,.wp-block-paragraph) + :where(p,.wp-block-paragraph,.wp-block-list) { margin-block-start:var(--labs-post-tight-gap); }
.single-post .labs-entry-content > .labs-editorial-section > :where(.wp-block-columns,.labs-fact-grid,.wp-block-table,.wp-block-gallery) + :where(p,.wp-block-paragraph) { margin-block-start:var(--labs-post-inner-gap); }
.single-post .labs-entry-content > :where(.wp-block-group,.labs-editorial-section) + :where(.wp-block-group,.labs-editorial-section) { margin-top:var(--labs-post-section-gap); padding-top:clamp(20px,2.5vw,27px); border-top:1px solid var(--labs-editorial-rule); }
.single-post .labs-entry-content :where(.wp-block-image,.wp-block-gallery) { margin-block:0; }

/* Specification tables use the same low-contrast depth hierarchy as the Build
   UI: page -> structured surface -> row separators. */
:where(.labs-entry-content,.editor-styles-wrapper) .wp-block-table.labs-key-value-table {
  overflow:hidden;
  border:1px solid var(--labs-border,var(--labs-editorial-rule));
  border-radius:3px;
  background:var(--labs-surface,rgba(127,127,127,.04));
}
:where(.labs-entry-content,.editor-styles-wrapper) .wp-block-table.labs-key-value-table table { background:transparent; }
:where(.labs-entry-content,.editor-styles-wrapper) .wp-block-table.labs-key-value-table td { padding:11px 12px; }
:where(.labs-entry-content,.editor-styles-wrapper) .wp-block-table.labs-key-value-table tr:last-child td { border-bottom:0; }
:where(.labs-entry-content,.editor-styles-wrapper) .wp-block-table.labs-key-value-table td:first-child { width:31%; min-width:145px; padding-right:20px; }
:where(.labs-entry-content,.editor-styles-wrapper) .wp-block-table.labs-key-value-table td:first-child > strong { color:var(--labs-heading,currentColor); font-family:var(--labs-font-mono,monospace); font-size:11px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; }
:where(.labs-entry-content,.editor-styles-wrapper) .wp-block-table.labs-key-value-table .labs-manual-entry { color:var(--labs-muted,currentColor); font-family:var(--labs-font-mono,monospace); font-size:11px; font-style:normal; letter-spacing:.035em; text-transform:uppercase; }
:where(.labs-entry-content,.editor-styles-wrapper) .wp-block-table.labs-key-value-table .labs-key-value-manual td { background:color-mix(in srgb,var(--labs-accent,#38bdf8) 3%,var(--labs-surface,transparent)); }
:where(.labs-entry-content,.editor-styles-wrapper) .labs-interactive-spec {
  padding:clamp(14px,2vw,20px);
  border:1px solid var(--labs-border,var(--labs-editorial-rule));
  border-radius:3px;
  background:var(--labs-surface-muted,rgba(127,127,127,.04));
}
:where(.labs-entry-content,.editor-styles-wrapper) .labs-interactive-spec > :first-child { margin-top:0; }
:where(.labs-entry-content,.editor-styles-wrapper) .labs-interactive-spec > :last-child { margin-bottom:0; }

/* Fact grids use deterministic cardinality classes emitted by the migrator.
   Desktop targets two balanced rows up to six columns; tablet/mobile collapse
   independently so source cardinality never creates accidental narrow cards. */
:where(.labs-entry-content,.editor-styles-wrapper) .labs-fact-grid {
  display:grid;
  align-items:stretch;
  gap:6px;
  margin-block:clamp(14px,1.8vw,20px);
}
:where(.labs-entry-content,.editor-styles-wrapper) .labs-fact-grid-cols-1 { grid-template-columns:1fr; }
:where(.labs-entry-content,.editor-styles-wrapper) .labs-fact-grid-cols-2 { grid-template-columns:repeat(2,minmax(0,1fr)); }
:where(.labs-entry-content,.editor-styles-wrapper) .labs-fact-grid-cols-3 { grid-template-columns:repeat(3,minmax(0,1fr)); }
:where(.labs-entry-content,.editor-styles-wrapper) .labs-fact-grid-cols-4 { grid-template-columns:repeat(4,minmax(0,1fr)); }
:where(.labs-entry-content,.editor-styles-wrapper) .labs-fact-grid-cols-5 { grid-template-columns:repeat(5,minmax(0,1fr)); }
:where(.labs-entry-content,.editor-styles-wrapper) .labs-fact-grid-cols-6 { grid-template-columns:repeat(6,minmax(0,1fr)); }
:where(.labs-entry-content,.editor-styles-wrapper) .labs-fact-card,
:where(.labs-entry-content,.editor-styles-wrapper) .labs-fact-card:first-child {
  min-height:76px;
  height:100%;
  align-self:stretch;
  padding:12px 13px;
  display:flex;
  flex-direction:column;
  gap:7px;
  margin-top:0;
  border:1px solid var(--labs-border,var(--labs-editorial-rule));
  border-radius:3px;
  background:var(--labs-surface-raised,var(--labs-surface,rgba(127,127,127,.04)));
}
:where(.labs-entry-content,.editor-styles-wrapper) .labs-fact-card > * { margin-block-start:0 !important; margin-block-end:0 !important; }
:where(.labs-entry-content,.editor-styles-wrapper) .labs-fact-card .wp-block-heading { max-width:none; color:var(--labs-muted,currentColor); font-family:var(--labs-font-mono,monospace); font-size:10px; line-height:1.25; letter-spacing:.06em; text-transform:uppercase; }
:where(.labs-entry-content,.editor-styles-wrapper) .labs-fact-card p { max-width:none; color:var(--labs-heading,currentColor); font-size:12px; line-height:1.45; }
:where(.labs-entry-content,.editor-styles-wrapper) .labs-fact-card .wp-block-list { max-width:none; margin:0; color:var(--labs-heading,currentColor); font-size:12px; line-height:1.45; }
:where(.labs-entry-content,.editor-styles-wrapper) .labs-fact-card .wp-block-buttons { margin-top:auto !important; padding-top:3px; }
:where(.labs-entry-content,.editor-styles-wrapper) .labs-fact-card .wp-block-button__link { min-height:29px; padding:7px 10px; font-size:10px; }

@media (max-width:781px) {
  :where(.labs-entry-content,.editor-styles-wrapper) { font-size:14px; }
  :where(.labs-entry-content,.editor-styles-wrapper) .wp-block-columns { gap:16px; }
  .wp-block-columns.is-style-labs-feature-columns,.wp-block-columns.is-style-labs-media-copy { gap:16px; }
  .wp-block-group.is-style-labs-panel,.wp-block-group.is-style-labs-technical-panel,.wp-block-group.is-style-labs-feature { padding:15px; }
  .single-post .labs-entry-content { --labs-post-section-gap:30px; --labs-post-inner-gap:14px; --labs-post-tight-gap:9px; }
  :where(.labs-entry-content,.editor-styles-wrapper) .labs-fact-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  :where(.labs-entry-content,.editor-styles-wrapper) .wp-block-table.labs-key-value-table td:first-child,
  .wp-block-table.is-style-labs-technical-table :where(th:first-child,td:first-child) { width:38%; min-width:118px; padding-right:12px; }
}

@media (max-width:480px) {
  :where(.labs-entry-content,.editor-styles-wrapper) .labs-fact-grid { grid-template-columns:1fr; }
}
