/**
 * Page Designer — Data Block (canvas + public) styles.
 * v1.0.0 (PAGE_DESIGNER_VERSION bump tracked in page_designer.php)
 *
 * STRICT ISOLATION
 * ----------------
 *   - Namespace: pd-blk-data-*  (CSS classes)
 *   - Data attrs: data-pd-data-*  (block state)
 *   - JS flags : __pdBlkData*
 *   - Shares no DOM, classes, or CSS variables with any other block
 *     or tool. Theme typography + Design panel still apply because the
 *     content lives inside a plain block container — vars below only
 *     drive the empty-state preview and the layout-template scaffolds.
 *
 * Phase 1 ships the empty-state preview only. The mode + layout class
 * hooks (.pd-blk-data-mode-*, .pd-blk-data-layout-*) are stubbed with
 * no visual rules yet — those land in Phase 2d when the Layout section
 * of the dedicated panel selects a template.
 */

.pd-blk-data {
    /* Empty-state scaffold — derived from the theme's General Text ink rather
       than fixed greys, so it reads on a light, mid OR dark theme: an ink tint
       darkens a light surface and lightens a dark one automatically. */
    --pd-blk-data-empty-bg:          color-mix(in srgb, var(--pd-general-color, #14141e) 5%, transparent);
    --pd-blk-data-empty-border:      color-mix(in srgb, var(--pd-general-color, #14141e) 18%, transparent);
    --pd-blk-data-empty-text:        color-mix(in srgb, var(--pd-general-color, #4b5563) 72%, transparent);
    --pd-blk-data-empty-icon-color:  color-mix(in srgb, var(--pd-general-color, #6b7280) 74%, transparent);
    --pd-blk-data-empty-radius:      8px;
    --pd-blk-data-empty-pad-y:       24px;
    --pd-blk-data-empty-pad-x:       20px;
    /* The value + label are CONTENT, so they follow the Global Theme's
       General Text colour (the same token every other content block uses).
       This is the single knob for ALL value layouts (plain / stat / big /
       stat card). Falls back to inherit only if the theme token is absent.
       NOTE: in the override canvas the admin-theme rule (pd_aov_theme_scope)
       colours the block ROOT with --at-color-text; setting an explicit
       colour on the value/label element itself wins over that inherited
       colour, so the data text now tracks General Text, not the admin theme. */
    --pd-blk-data-value-color:       var(--pd-general-color, inherit);
    /* Field captions: quieter than the value, but they are still data the user
       has to read. 65% landed under 3:1 on tinted surfaces, so the fade is now
       gentler — clearly secondary, comfortably legible on light and dark. */
    --pd-blk-data-label-color:       color-mix(in srgb, var(--pd-general-color, var(--at-color-muted-foreground, #6b7280)) 82%, transparent);
    --pd-blk-data-row-gap:           4px;

    position: relative;
    box-sizing: border-box;
    min-width: 40px;
    min-height: 24px;
    /* Cap + centre exactly like every other inserted block. Mirrors the
       section-container / footer formula (max-width: --pd-container-width;
       margin auto), so a Data block placed loose (outside a centred
       container) never spreads edge-to-edge — it caps at the page's content
       width on web pages and stays full-width on admin (where the token is
       100%). Falls back to 100% when no token is present, so nothing that
       already sits inside a container regresses. */
    max-width: var(--pd-container-width, 100%);
    margin-inline: auto;
}

/* ── Empty state — shown until the panel binds a source ────────────── */
.pd-blk-data-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: var(--pd-blk-data-empty-pad-y) var(--pd-blk-data-empty-pad-x);
    background: var(--pd-blk-data-empty-bg);
    border: 1px dashed var(--pd-blk-data-empty-border);
    border-radius: var(--pd-blk-data-empty-radius);
    color: var(--pd-blk-data-empty-text);
    text-align: center;
    font-size: 13px;
    line-height: 1.4;
}

.pd-blk-data-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--pd-general-color, #14141e) 6%, transparent);
    color: var(--pd-blk-data-empty-icon-color);
    font-size: 17px;
}

.pd-blk-data-empty-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--pd-general-color, #111827);
}

.pd-blk-data-empty-hint {
    font-size: 12px;
    color: var(--pd-blk-data-empty-text);
    max-width: 280px;
}

.pd-blk-data-empty-source {
    margin-top: 4px;
    font-size: 11px;
    color: color-mix(in srgb, var(--pd-general-color, #4b5563) 72%, transparent);
    background: color-mix(in srgb, var(--pd-general-color, #14141e) 7%, transparent);
    padding: 3px 8px;
    border-radius: 4px;
    font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
}

/* ── Loading skeleton — shown while AJAX fetch is in flight ───────── */
.pd-blk-data-loading {
    display: inline-block;
    width: 100%;
    min-height: 18px;
    background: linear-gradient(
        90deg,
        color-mix(in srgb, var(--pd-general-color, #14141e) 7%, transparent) 0%,
        color-mix(in srgb, var(--pd-general-color, #14141e) 14%, transparent) 50%,
        color-mix(in srgb, var(--pd-general-color, #14141e) 7%, transparent) 100%
    );
    background-size: 200% 100%;
    border-radius: 4px;
    animation: pdBlkDataShimmer 1.2s ease-in-out infinite;
}

@keyframes pdBlkDataShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Error state — admin-only fallback when the fetch fails ───────── */
.pd-blk-data-error {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    /* Error red stays semantic, but the INK is blended toward the theme's own
       text colour so it lightens on a dark theme instead of going murky. */
    background: color-mix(in srgb, #e5484d 12%, transparent);
    border: 1px solid color-mix(in srgb, #e5484d 32%, transparent);
    border-radius: 4px;
    color: color-mix(in srgb, #e5484d 68%, var(--pd-general-color, #b91c1c));
    font-size: 12px;
    font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
}

.pd-blk-data-error::before {
    content: "\f071"; /* fa-exclamation-triangle */
    font-family: "FontAwesome";
    font-size: 11px;
}

/* ── Rendered value primitives (all layouts share these) ──────────── */
.pd-blk-data-value {
    color: var(--pd-blk-data-value-color);
}

.pd-blk-data-label {
    color: var(--pd-blk-data-label-color);
    font-size: 0.85em;
}

/* ── Trend arrow (auto "vs last month") — green up / red down / grey flat.
   Semantic status colours (universal), not theme chrome; flat borrows the
   theme's general text so it sits quietly. Auto-coloured = zero config.
   Up/down text is the status hue BLENDED with the page's general text
   colour, so it self-lightens on dark themes and self-darkens on light
   ones (fixed #c0362c read 2.7:1 on dark cards). Fallback = the old
   fixed hue for pages without the var. ── */
.pd-blk-data-trend {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-top: 4px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 0.72em;
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
}
.pd-blk-data-trend-arrow { font-size: 0.9em; }
.pd-blk-data-trend-up {
    color: color-mix(in srgb, #12a150 60%, var(--pd-general-color, #0f7b40));
    background: color-mix(in srgb, #12a150 15%, transparent);
}
.pd-blk-data-trend-down {
    color: color-mix(in srgb, #e5484d 60%, var(--pd-general-color, #c0362c));
    background: color-mix(in srgb, #e5484d 15%, transparent);
}
.pd-blk-data-trend-flat {
    color: color-mix(in srgb, var(--pd-general-color, #6b7280) 72%, transparent);
    background: color-mix(in srgb, var(--pd-general-color, #6b7280) 10%, transparent);
}

.pd-blk-data-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.pd-blk-data-rows {
    display: flex;
    flex-direction: column;
    gap: var(--pd-blk-data-row-gap);
}

/* ── Mode + layout class hooks ──────────────────────────────────── */
.pd-blk-data-mode-unset {}
.pd-blk-data-mode-value {}
.pd-blk-data-mode-record {}
.pd-blk-data-mode-collection {}
.pd-blk-data-mode-page-chrome {}

.pd-blk-data-layout-placeholder {}

/* ── Value-mode layouts ─────────────────────────────────────────── */
.pd-blk-data-stat {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 18px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--pd-general-color, #14141e) 4%, transparent);
    border: 1px solid color-mix(in srgb, var(--pd-general-color, #14141e) 9%, transparent);
}
.pd-blk-data-stat-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    color: var(--pd-blk-data-value-color, inherit);
}
.pd-blk-data-stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--pd-blk-data-label-color, #6b7280);
}
.pd-blk-data-big {
    text-align: center;
}
.pd-blk-data-big-value {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.05;
    color: var(--pd-blk-data-value-color, inherit);
}
.pd-blk-data-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--pd-accent, var(--pd-primary, #4f46e5)) 14%, transparent);
    color: color-mix(in srgb, var(--pd-accent, var(--pd-primary, #4f46e5)) 70%, var(--pd-general-color, #14141e));
    font-size: 12px;
    font-weight: 600;
}

/* ── Stat Card — reference skin (the FORMULA template for richer skins)
   • surface, colours and type pulled from the active Global Theme
     (--pd-* tokens) with safe fallbacks; exactly ONE accent
   • 8-point spacing rhythm; the number is the focal point (header
     type), the label is the smallest caption (visual hierarchy)
   • responds to its OWN width via a container query (never the
     viewport) so it looks right in a full / half / quarter column
   • plain font sizes only — NO fluid vw/cqi (those collapse to the
     min inside the editor-canvas iframe); the @container band steps
     the number instead
   • hover lift gated behind prefers-reduced-motion                 ── */
.pd-blk-data-statcard {
    container-type: inline-size;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding: 24px;
    min-width: 0;
    max-width: 100%;
    border-radius: 16px;
    background: var(--pd-color-column, #ffffff);
    border: 1px solid color-mix(in srgb, var(--pd-general-color, #14141e) 10%, transparent);
}
.pd-blk-data-statcard-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* The chip hugs the glyph with padding measured in em, so when the icon
       size grows (font-size override) the circle grows with it. aspect-ratio
       keeps it a perfect circle. */
    padding: 0.55em;
    aspect-ratio: 1;
    box-sizing: content-box;
    margin-bottom: 4px;
    border-radius: 50%;
    color: color-mix(in srgb, var(--pd-accent, var(--pd-primary, #4f46e5)) 70%, var(--pd-general-color, #14141e));
    background: color-mix(in srgb, var(--pd-accent, var(--pd-primary, #4f46e5)) 14%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pd-accent, var(--pd-primary, #4f46e5)) 28%, transparent);
    font-size: 20px; /* default size for a chosen FontAwesome icon; inline SVG uses its own w/h */
}
.pd-blk-data-statcard-icon svg {
    width: 22px;
    height: 22px;
}
.pd-blk-data-statcard-value {
    /* The headline number is PROMINENT text, so it follows the theme's
       HEADER Text dial IN FULL — font, weight, colour AND size. Nothing is
       hardcoded. The colour is declared on the value element itself, so it
       wins over the admin-theme rule that colours the block root. */
    font-family: var(--pd-header-font, inherit);
    font-weight: var(--pd-header-weight, 800);
    color:       var(--pd-header-color, #14141e);
    font-size:   var(--pd-header-size, 36px);
    line-height: 1.05;
}
.pd-blk-data-statcard-label {
    /* The caption follows the theme's GENERAL Text dial — font, weight and
       size — in a muted shade of its colour. Uppercase is the only
       presentational touch; every size/weight/colour value is the theme's. */
    font-family: var(--pd-general-font, inherit);
    font-weight: var(--pd-general-weight, 600);
    font-size:   var(--pd-general-size, 13px);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--pd-blk-data-label-color, #6b7280);
}
/* Tighten padding on a very narrow column (sizes stay theme-driven). */
@container (max-width: 199px) {
    .pd-blk-data-statcard { padding: 16px; }
}
/* Polish — subtle hover lift, motion-safe */
@media (prefers-reduced-motion: no-preference) {
    .pd-blk-data-statcard {
        transition: transform .18s ease, box-shadow .18s ease;
    }
    .pd-blk-data-statcard:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px color-mix(in srgb, var(--pd-general-color, #14141e) 12%, transparent);
    }
}

/* ── Value-skin library (wave 1) — shared base + per-layout modifiers ───────
   Theme-driven (--pd-* tokens), 8-point spacing, one accent, container-safe.
   Every piece is a tagged part the styling tools can override.            ── */
.pd-blk-data-vskin {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
}
.pd-blk-data-vskin-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.pd-blk-data-vskin-value {
    font-family: var(--pd-general-font, inherit);
    font-weight: 800;
    color: var(--pd-general-color, #14141e);
    font-size: 32px;
    line-height: 1.05;
}
.pd-blk-data-vskin-label {
    font-family: var(--pd-general-font, inherit);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: color-mix(in srgb, var(--pd-general-color, #14141e) 74%, transparent);
}
.pd-blk-data-vskin-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--pd-accent, var(--pd-primary, #4f46e5));
    font-size: 20px;
}
.pd-blk-data-vskin-icon svg { width: 22px; height: 22px; }

/* Icon beside the figure */
.pd-blk-data-vskin-iconrow { flex-direction: row; align-items: center; gap: 14px; }
.pd-blk-data-vskin-iconrow .pd-blk-data-vskin-icon {
    padding: 0.5em; aspect-ratio: 1; box-sizing: content-box; border-radius: 14px;
    background: color-mix(in srgb, var(--pd-accent, var(--pd-primary, #4f46e5)) 12%, transparent);
}
/* Icon stacked above, centred */
.pd-blk-data-vskin-iconstack { align-items: center; text-align: center; gap: 8px; }
.pd-blk-data-vskin-iconstack .pd-blk-data-vskin-text { align-items: center; }
.pd-blk-data-vskin-iconstack .pd-blk-data-vskin-icon {
    padding: 0.55em; aspect-ratio: 1; box-sizing: content-box; border-radius: 50%;
    background: color-mix(in srgb, var(--pd-accent, var(--pd-primary, #4f46e5)) 14%, transparent);
}
/* Compact tile */
.pd-blk-data-vskin-tile {
    align-items: center; text-align: center; gap: 4px; padding: 18px; border-radius: 14px;
    background: var(--pd-color-column, #ffffff);
    border: 1px solid color-mix(in srgb, var(--pd-general-color, #14141e) 10%, transparent);
    box-shadow: 0 2px 12px color-mix(in srgb, var(--pd-general-color, #14141e) 8%, transparent);
}
.pd-blk-data-vskin-tile .pd-blk-data-vskin-text { align-items: center; }
.pd-blk-data-vskin-tile .pd-blk-data-vskin-value { font-size: 26px; }
/* Underline accent */
.pd-blk-data-vskin-underline .pd-blk-data-vskin-value {
    display: inline-block; padding-bottom: 6px;
    border-bottom: 3px solid var(--pd-accent, var(--pd-primary, #4f46e5));
}
/* Outlined box with a left accent bar (distinct from the filled Tile) */
.pd-blk-data-vskin-boxed {
    align-items: flex-start;
    padding: 16px 18px 16px 20px; border-radius: 10px;
    border: 1px solid color-mix(in srgb, var(--pd-general-color, #14141e) 16%, transparent);
    border-left: 4px solid var(--pd-accent, var(--pd-primary, #4f46e5));
}
/* Gradient surface (icon beside) */
.pd-blk-data-vskin-gradient {
    flex-direction: row; align-items: center; gap: 14px; padding: 18px 20px; border-radius: 14px;
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--pd-accent, var(--pd-primary, #4f46e5)) 18%, transparent),
        color-mix(in srgb, var(--pd-accent, var(--pd-primary, #4f46e5)) 4%, transparent));
}
.pd-blk-data-vskin-gradient .pd-blk-data-vskin-icon {
    font-size: 24px;
    padding: 0.5em; aspect-ratio: 1; box-sizing: content-box; border-radius: 50%;
    background: color-mix(in srgb, var(--pd-accent, var(--pd-primary, #4f46e5)) 22%, transparent);
}
.pd-blk-data-vskin-gradient .pd-blk-data-vskin-icon svg { width: 24px; height: 24px; }
/* Minimal — just the figure + caption */
.pd-blk-data-vskin-minimal { gap: 2px; }
.pd-blk-data-vskin-minimal .pd-blk-data-vskin-value { font-size: 34px; }
/* Full-width banner */
.pd-blk-data-vskin-banner {
    flex-direction: row; align-items: center; gap: 16px; width: 100%; padding: 16px 24px; border-radius: 12px;
    background: color-mix(in srgb, var(--pd-accent, var(--pd-primary, #4f46e5)) 10%, transparent);
    border-left: 4px solid var(--pd-accent, var(--pd-primary, #4f46e5));
}
.pd-blk-data-vskin-banner .pd-blk-data-vskin-text { flex: 1 1 auto; }
/* Ring gauge — figure inside an accent ring */
.pd-blk-data-vskin-ring { align-items: center; text-align: center; }
.pd-blk-data-vskin-ring .pd-blk-data-vskin-text {
    align-items: center; justify-content: center; width: 120px; height: 120px; border-radius: 50%;
    border: 8px solid color-mix(in srgb, var(--pd-accent, var(--pd-primary, #4f46e5)) 30%, transparent);
}
.pd-blk-data-vskin-ring .pd-blk-data-vskin-value { font-size: 28px; }
/* Quote figure */
.pd-blk-data-vskin-quote {
    padding-left: 18px;
    border-left: 4px solid color-mix(in srgb, var(--pd-accent, var(--pd-primary, #4f46e5)) 50%, transparent);
}
.pd-blk-data-vskin-quote .pd-blk-data-vskin-value { font-size: 30px; font-style: italic; }
/* Inline figure — sits in a line of text */
.pd-blk-data-vskin-inline { display: inline-flex; flex-direction: row; }
.pd-blk-data-vskin-inline .pd-blk-data-vskin-text { flex-direction: row; }
.pd-blk-data-vskin-inline .pd-blk-data-vskin-value { font-size: inherit; font-weight: 700; }
/* Split — label left, value right */
.pd-blk-data-vskin-splitrow {
    flex-direction: row; align-items: baseline; justify-content: space-between; gap: 16px; width: 100%;
}
.pd-blk-data-vskin-splitrow .pd-blk-data-vskin-value { font-size: 26px; }

/* ══ Record-skin library (15 unique single-record layouts) ═══════════════ */
.pd-blk-data-rskin { box-sizing: border-box; display: flex; flex-direction: column; gap: 8px; min-width: 0; max-width: 100%; }
.pd-blk-data-rskin-fields { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pd-blk-data-rskin .pd-blk-data-row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.pd-blk-data-rskin .pd-blk-data-label { color: color-mix(in srgb, var(--pd-general-color, #14141e) 78%, transparent); font-family: var(--pd-general-font, inherit); font-size: 12px; }
.pd-blk-data-rskin .pd-blk-data-value { color: var(--pd-general-color, #14141e); font-family: var(--pd-general-font, inherit); font-weight: 600; font-size: 14px; }
.pd-blk-data-rskin-avatar {
    display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
    width: 48px; height: 48px; border-radius: 50%; font-weight: 700; font-size: 16px;
    color: var(--pd-accent, var(--pd-primary, #4f46e5));
    background: color-mix(in srgb, var(--pd-accent, var(--pd-primary, #4f46e5)) 15%, transparent);
}
/* Profile — avatar on top, everything centred */
.pd-blk-data-rskin-profile { align-items: center; text-align: center; gap: 12px; padding: 20px; border-radius: 14px; background: var(--pd-color-column, #fff); border: 1px solid color-mix(in srgb, var(--pd-general-color, #14141e) 10%, transparent); }
.pd-blk-data-rskin-profile .pd-blk-data-rskin-fields { align-items: center; }
.pd-blk-data-rskin-profile .pd-blk-data-row { flex-direction: column; align-items: center; gap: 1px; }
/* Mini profile — avatar left, tight stacked fields */
.pd-blk-data-rskin-mini { flex-direction: row; align-items: center; gap: 12px; }
.pd-blk-data-rskin-mini .pd-blk-data-rskin-avatar { width: 40px; height: 40px; font-size: 14px; }
.pd-blk-data-rskin-mini .pd-blk-data-row { flex-direction: column; align-items: flex-start; gap: 0; }
/* Contact card — divided rows */
.pd-blk-data-rskin-contact { padding: 14px 18px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--pd-general-color, #14141e) 12%, transparent); }
.pd-blk-data-rskin-contact .pd-blk-data-row { padding: 7px 0; border-bottom: 1px solid color-mix(in srgb, var(--pd-general-color, #14141e) 8%, transparent); }
.pd-blk-data-rskin-contact .pd-blk-data-row:last-child { border-bottom: 0; }
/* Detail panel — filled surface with a lift */
.pd-blk-data-rskin-panel { padding: 18px 20px; border-radius: 14px; background: var(--pd-color-column, #fff); box-shadow: 0 4px 16px color-mix(in srgb, var(--pd-general-color, #14141e) 10%, transparent); }
/* Two-column record */
.pd-blk-data-rskin-twocol .pd-blk-data-rskin-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; }
@container (max-width: 360px) { .pd-blk-data-rskin-twocol .pd-blk-data-rskin-fields { grid-template-columns: 1fr; } }
/* Spec sheet — dense dashed key/value */
.pd-blk-data-rskin-spec { padding: 14px 16px; border: 1px solid color-mix(in srgb, var(--pd-general-color, #14141e) 14%, transparent); border-radius: 8px; }
.pd-blk-data-rskin-spec .pd-blk-data-rskin-fields { gap: 0; }
.pd-blk-data-rskin-spec .pd-blk-data-row { padding: 6px 0; border-bottom: 1px dashed color-mix(in srgb, var(--pd-general-color, #14141e) 12%, transparent); }
.pd-blk-data-rskin-spec .pd-blk-data-row:last-child { border-bottom: 0; }
.pd-blk-data-rskin-spec .pd-blk-data-label { text-transform: uppercase; letter-spacing: 0.04em; font-size: 11px; }
/* Hero record — first field is huge */
.pd-blk-data-rskin-hero .pd-blk-data-row:first-child { flex-direction: column; align-items: flex-start; gap: 0; }
.pd-blk-data-rskin-hero .pd-blk-data-row:first-child .pd-blk-data-value { font-size: 30px; font-weight: 800; line-height: 1.1; }
/* Media record — square avatar left, fields right, card */
.pd-blk-data-rskin-media { flex-direction: row; align-items: flex-start; gap: 16px; padding: 16px; border-radius: 12px; background: var(--pd-color-column, #fff); border: 1px solid color-mix(in srgb, var(--pd-general-color, #14141e) 10%, transparent); }
.pd-blk-data-rskin-media .pd-blk-data-rskin-avatar { width: 64px; height: 64px; border-radius: 12px; font-size: 20px; }
.pd-blk-data-rskin-media .pd-blk-data-rskin-fields { flex: 1 1 auto; }
/* Image-header card — avatar band across the top */
.pd-blk-data-rskin-imghead { gap: 0; border-radius: 14px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--pd-general-color, #14141e) 10%, transparent); }
.pd-blk-data-rskin-imghead .pd-blk-data-rskin-avatar { width: 100%; height: 84px; border-radius: 0; font-size: 26px; background: color-mix(in srgb, var(--pd-accent, var(--pd-primary, #4f46e5)) 18%, transparent); }
.pd-blk-data-rskin-imghead .pd-blk-data-rskin-fields { padding: 14px 16px; }
/* Quote record — first field as a pull-quote */
.pd-blk-data-rskin-quote { padding-left: 18px; border-left: 4px solid color-mix(in srgb, var(--pd-accent, var(--pd-primary, #4f46e5)) 50%, transparent); }
.pd-blk-data-rskin-quote .pd-blk-data-row:first-child .pd-blk-data-value { font-size: 20px; font-style: italic; }
.pd-blk-data-rskin-quote .pd-blk-data-row:first-child .pd-blk-data-label { display: none; }
/* Badge record — first field as a pill */
.pd-blk-data-rskin-badge .pd-blk-data-row:first-child { display: inline-flex; }
.pd-blk-data-rskin-badge .pd-blk-data-row:first-child .pd-blk-data-label { display: none; }
.pd-blk-data-rskin-badge .pd-blk-data-row:first-child .pd-blk-data-value { padding: 3px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--pd-accent, var(--pd-primary, #4f46e5)); background: color-mix(in srgb, var(--pd-accent, var(--pd-primary, #4f46e5)) 15%, transparent); }
/* Summary banner — full width gradient, fields in a row */
.pd-blk-data-rskin-summary { width: 100%; padding: 18px 22px; border-radius: 12px; background: linear-gradient(135deg, color-mix(in srgb, var(--pd-accent, var(--pd-primary, #4f46e5)) 16%, transparent), color-mix(in srgb, var(--pd-accent, var(--pd-primary, #4f46e5)) 3%, transparent)); }
.pd-blk-data-rskin-summary .pd-blk-data-rskin-fields { flex-direction: row; flex-wrap: wrap; gap: 8px 28px; }
.pd-blk-data-rskin-summary .pd-blk-data-row { flex-direction: column; align-items: flex-start; gap: 0; }
/* Timeline entry — dot + line on the left */
.pd-blk-data-rskin-timeline { position: relative; padding-left: 22px; }
.pd-blk-data-rskin-timeline::before { content: ""; position: absolute; left: 5px; top: 4px; bottom: 4px; width: 2px; background: color-mix(in srgb, var(--pd-accent, var(--pd-primary, #4f46e5)) 30%, transparent); }
.pd-blk-data-rskin-timeline::after { content: ""; position: absolute; left: 0; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--pd-accent, var(--pd-primary, #4f46e5)); }
/* Highlight record — first field emphasised in accent */
.pd-blk-data-rskin-highlight .pd-blk-data-row:first-child .pd-blk-data-value { font-size: 24px; font-weight: 800; color: var(--pd-accent, var(--pd-primary, #4f46e5)); }
/* Address card — labels hidden, values stacked */
.pd-blk-data-rskin-address { padding: 14px 16px; border-radius: 10px; background: color-mix(in srgb, var(--pd-general-color, #14141e) 4%, transparent); }
.pd-blk-data-rskin-address .pd-blk-data-row { flex-direction: column; align-items: flex-start; gap: 0; }
.pd-blk-data-rskin-address .pd-blk-data-label { display: none; }
.pd-blk-data-rskin-address .pd-blk-data-value { font-weight: 500; line-height: 1.5; }

/* ══ Collection-skin library (15 unique list / grid / table layouts) ═════ */
.pd-blk-data-cskin { box-sizing: border-box; min-width: 0; max-width: 100%; }
.pd-blk-data-cskin-listwrap { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.pd-blk-data-cskin-item { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pd-blk-data-cskin-fields { flex: 1 1 auto; min-width: 0; }
.pd-blk-data-cskin .pd-blk-data-row { display: flex; justify-content: space-between; gap: 10px; }
.pd-blk-data-cskin .pd-blk-data-label { color: color-mix(in srgb, var(--pd-general-color, #14141e) 78%, transparent); font-family: var(--pd-general-font, inherit); font-size: 11px; }
.pd-blk-data-cskin .pd-blk-data-value { color: var(--pd-general-color, #14141e); font-family: var(--pd-general-font, inherit); font-size: 13px; }
.pd-blk-data-cskin-avatar { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; font-weight: 700; font-size: 13px; color: color-mix(in srgb, var(--pd-accent, var(--pd-primary, #4f46e5)) 70%, var(--pd-general-color, #14141e)); background: color-mix(in srgb, var(--pd-accent, var(--pd-primary, #4f46e5)) 15%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pd-accent, var(--pd-primary, #4f46e5)) 28%, transparent); }
.pd-blk-data-cskin-rank { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; font-weight: 700; font-size: 12px; color: color-mix(in srgb, var(--pd-accent, var(--pd-primary, #4f46e5)) 70%, var(--pd-general-color, #14141e)); background: color-mix(in srgb, var(--pd-accent, var(--pd-primary, #4f46e5)) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pd-accent, var(--pd-primary, #4f46e5)) 28%, transparent); }
.pd-blk-data-cskin-gridwrap { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.pd-blk-data-cskin-gridwrap .pd-blk-data-cskin-item { flex-direction: column; align-items: stretch; }
/* Divided list */
.pd-blk-data-cskin-divided .pd-blk-data-cskin-item { padding: 10px 0; border-bottom: 1px solid color-mix(in srgb, var(--pd-general-color, #14141e) 10%, transparent); }
.pd-blk-data-cskin-divided .pd-blk-data-cskin-item:last-child { border-bottom: 0; }
/* Two-line list — primary bold, secondary muted, stacked */
.pd-blk-data-cskin-twoline .pd-blk-data-cskin-item { padding: 8px 0; }
.pd-blk-data-cskin-twoline .pd-blk-data-row { flex-direction: column; gap: 0; }
.pd-blk-data-cskin-twoline .pd-blk-data-row:first-child .pd-blk-data-value { font-weight: 700; font-size: 14px; }
/* Icon list — small square avatar */
.pd-blk-data-cskin-iconlist .pd-blk-data-cskin-item { padding: 8px 0; }
.pd-blk-data-cskin-iconlist .pd-blk-data-cskin-avatar { width: 30px; height: 30px; border-radius: 8px; }
/* Avatar list — round avatar, hover rows */
.pd-blk-data-cskin-avatarlist .pd-blk-data-cskin-item { padding: 10px 12px; border-radius: 10px; }
.pd-blk-data-cskin-avatarlist .pd-blk-data-cskin-item:hover { background: color-mix(in srgb, var(--pd-general-color, #14141e) 4%, transparent); }
/* Numbered list */
.pd-blk-data-cskin-numbered .pd-blk-data-cskin-item { padding: 8px 0; }
.pd-blk-data-cskin-numbered .pd-blk-data-cskin-rank { border-radius: 6px; }
/* Leaderboard — ranked rows with a soft surface */
.pd-blk-data-cskin-leaderboard .pd-blk-data-cskin-item { padding: 10px 12px; border-radius: 10px; margin-bottom: 6px; background: color-mix(in srgb, var(--pd-general-color, #14141e) 3%, transparent); }
.pd-blk-data-cskin-leaderboard .pd-blk-data-cskin-rank { width: 30px; height: 30px; font-size: 14px; }
/* Tile wall — uniform bordered tiles */
.pd-blk-data-cskin-tilewall .pd-blk-data-cskin-item { padding: 14px; border-radius: 12px; text-align: center; background: var(--pd-color-column, #fff); border: 1px solid color-mix(in srgb, var(--pd-general-color, #14141e) 10%, transparent); }
/* Media grid — centred avatar cards */
.pd-blk-data-cskin-mediagrid .pd-blk-data-cskin-item { padding: 16px; border-radius: 12px; align-items: center; text-align: center; background: var(--pd-color-column, #fff); border: 1px solid color-mix(in srgb, var(--pd-general-color, #14141e) 10%, transparent); }
.pd-blk-data-cskin-mediagrid .pd-blk-data-cskin-avatar { width: 52px; height: 52px; margin-bottom: 6px; }
/* Masonry — staggered columns */
.pd-blk-data-cskin-masonry.pd-blk-data-cskin-gridwrap { display: block; column-count: 2; column-gap: 12px; }
.pd-blk-data-cskin-masonry .pd-blk-data-cskin-item { break-inside: avoid; margin-bottom: 12px; padding: 14px; border-radius: 12px; background: var(--pd-color-column, #fff); border: 1px solid color-mix(in srgb, var(--pd-general-color, #14141e) 10%, transparent); }
@container (max-width: 420px) { .pd-blk-data-cskin-masonry.pd-blk-data-cskin-gridwrap { column-count: 1; } }
/* Striped + compact tables */
.pd-blk-data-cskin.pd-blk-data-table { width: 100%; border-collapse: collapse; font-family: var(--pd-general-font, inherit); }
.pd-blk-data-cskin.pd-blk-data-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: color-mix(in srgb, var(--pd-general-color, #14141e) 78%, transparent); }
.pd-blk-data-cskin.pd-blk-data-table td { color: var(--pd-general-color, #14141e); }
.pd-blk-data-cskin-striped th, .pd-blk-data-cskin-striped td { padding: 9px 12px; }
.pd-blk-data-cskin-striped tbody tr:nth-child(even) { background: color-mix(in srgb, var(--pd-general-color, #14141e) 4%, transparent); }
.pd-blk-data-cskin-compact th, .pd-blk-data-cskin-compact td { padding: 4px 8px; font-size: 12px; border-bottom: 1px solid color-mix(in srgb, var(--pd-general-color, #14141e) 8%, transparent); }
/* Stat grid — separate mini-stat cards */
.pd-blk-data-cskin-statgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.pd-blk-data-cskin-statitem { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 14px; border-radius: 12px; background: var(--pd-color-column, #fff); border: 1px solid color-mix(in srgb, var(--pd-general-color, #14141e) 10%, transparent); }
.pd-blk-data-cskin-stat-value { font-family: var(--pd-general-font, inherit); font-size: 24px; font-weight: 800; color: var(--pd-general-color, #14141e); line-height: 1.1; }
.pd-blk-data-cskin-stat-label { font-family: var(--pd-general-font, inherit); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: color-mix(in srgb, var(--pd-general-color, #14141e) 78%, transparent); }
/* Summary strip — one banner row of figures with dividers */
.pd-blk-data-cskin-strip { display: flex; flex-wrap: wrap; gap: 0; padding: 16px 0; border-radius: 12px; background: color-mix(in srgb, var(--pd-accent, var(--pd-primary, #4f46e5)) 8%, transparent); }
.pd-blk-data-cskin-strip .pd-blk-data-cskin-statitem { flex: 1 1 120px; border: 0; background: transparent; border-left: 1px solid color-mix(in srgb, var(--pd-general-color, #14141e) 12%, transparent); }
.pd-blk-data-cskin-strip .pd-blk-data-cskin-statitem:first-child { border-left: 0; }
/* Pill cloud */
.pd-blk-data-cskin-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pd-blk-data-cskin-pill { display: inline-block; padding: 5px 12px; border-radius: 999px; font-family: var(--pd-general-font, inherit); font-size: 13px; color: var(--pd-general-color, #14141e); background: color-mix(in srgb, var(--pd-accent, var(--pd-primary, #4f46e5)) 12%, transparent); }
/* Featured + list — one big card then a divided list */
.pd-blk-data-cskin-featured { display: flex; flex-direction: column; gap: 12px; }
.pd-blk-data-cskin-feat-main { padding: 18px 20px; border-radius: 14px; background: var(--pd-color-column, #fff); border: 1px solid color-mix(in srgb, var(--pd-general-color, #14141e) 10%, transparent); box-shadow: 0 4px 16px color-mix(in srgb, var(--pd-general-color, #14141e) 10%, transparent); }
.pd-blk-data-cskin-feat-main .pd-blk-data-row { display: flex; justify-content: space-between; gap: 12px; }
.pd-blk-data-cskin-feat-main .pd-blk-data-row:first-child .pd-blk-data-value { font-size: 20px; font-weight: 800; }
.pd-blk-data-cskin-feat-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.pd-blk-data-cskin-feat-item { padding: 8px 0; border-bottom: 1px solid color-mix(in srgb, var(--pd-general-color, #14141e) 8%, transparent); }
.pd-blk-data-cskin-feat-item:last-child { border-bottom: 0; }
.pd-blk-data-cskin-feat-item .pd-blk-data-row { display: flex; justify-content: space-between; gap: 10px; }
.pd-blk-data-cskin-feat-list .pd-blk-data-label { color: color-mix(in srgb, var(--pd-general-color, #14141e) 78%, transparent); font-size: 11px; }
.pd-blk-data-cskin-feat-list .pd-blk-data-value { color: var(--pd-general-color, #14141e); font-size: 13px; }
/* Chart layouts — Chart.js CANVAS legend is OFF (it collapses off-canvas on
   radial charts whenever the chart redraws). We render our OWN HTML legend as a
   sibling of the canvas, tagged data-pd-data-part="chartlabel", so it styles via
   the same per-part CSS as every other layout and can never be dropped. The
   canvas sits in a FIXED-height, position:relative, dedicated wrapper (mirrors
   the proven standalone Charts block) and is never touched after first draw. */
.pd-blk-data-cskin-chart {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
}
.pd-blk-data-cskin-chart.pd-blk-data-chart-legpos-top   { flex-direction: column-reverse; }
.pd-blk-data-cskin-chart.pd-blk-data-chart-legpos-right { flex-direction: row;         align-items: center; }
.pd-blk-data-cskin-chart.pd-blk-data-chart-legpos-left  { flex-direction: row-reverse; align-items: center; }
.pd-blk-data-cskin-chart .pd-blk-data-chart-canvas-wrap {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    height: 300px;
    box-sizing: border-box;
}
.pd-blk-data-cskin-chart .pd-blk-data-chart-canvas-wrap > canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
}
/* HTML legend — swatch + label per slice. Text colour/size/font inherit from
   the chartlabel per-part styling (and the card's own text colour by default). */
.pd-blk-data-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    justify-content: center;
    align-content: center;
}
.pd-blk-data-chart-legpos-left  .pd-blk-data-chart-legend,
.pd-blk-data-chart-legpos-right .pd-blk-data-chart-legend {
    flex-direction: column;
    flex-wrap: nowrap;
    flex: 0 0 auto;
}
.pd-blk-data-chart-leg-item { display: inline-flex; align-items: center; gap: 6px; line-height: 1.3; }
.pd-blk-data-chart-leg-sw   { width: 12px; height: 12px; border-radius: 3px; flex: none; display: inline-block; }
.pd-blk-data-chart-leg-hidden { display: none !important; }

/* Calendar layouts — FullCalendar mounts into the datacal container. It needs a
   definite parent height + position:relative. Dedicated pd-blk-datacal-* mount;
   FullCalendar ships its own chrome CSS (main.min.css, loaded by the runtime). */
.pd-blk-data-cskin-cal { width: 100%; box-sizing: border-box; }
.pd-blk-data-cskin-cal .pd-blk-datacal-mount {
    position: relative;
    width: 100%;
    height: 480px;
    box-sizing: border-box;
}
/* "Highlight today" OFF — beat FullCalendar's own today rule on specificity. */
.pd-blk-data-cal-notoday .fc .fc-day-today { background-color: transparent; }

/* Combined layouts — several curated sections (stat row + chart + list…) stacked
   in one block. Each section keeps its own skin; the combo just spaces them. */
.pd-blk-data-combo { display: flex; flex-direction: column; gap: 20px; width: 100%; box-sizing: border-box; }
/* Column arrangements — up to N columns, reflowing DOWN to fewer as the combo's
   own width shrinks (responsive to container, per the layout formula). The calc
   gives exactly N when there's room; below the min width, fewer columns fit. */
.pd-blk-data-combo-cols2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(max(260px, calc((100% - 24px) / 2)), 1fr));
    gap: 20px 24px;
}
.pd-blk-data-combo-cols3 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(max(240px, calc((100% - 48px) / 3)), 1fr));
    gap: 20px 24px;
}
.pd-blk-data-combo-cols4 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(max(220px, calc((100% - 72px) / 4)), 1fr));
    gap: 20px 24px;
}
.pd-blk-data-combo-sec { width: 100%; min-width: 0; }
/* Per-section alignment (SoT alignment tool) — moves the actual CONTENT block,
   not just the heading. Inside a combo the stat tiles become a wrapping flex row
   of content-sized tiles, so the GROUP genuinely shifts left / centre / right.
   Text + list content follows text-align. Full-width charts already fill, so
   they stay put. */
.pd-blk-data-combo .pd-blk-data-cskin-statgrid {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 12px;
}
.pd-blk-data-combo .pd-blk-data-cskin-statgrid > .pd-blk-data-cskin-statitem {
    flex: 0 1 auto;
    min-width: 120px;
}
/* Card grids get the same treatment as the stat tiles above: a wrapping flex
   row of column-width cards. As a plain grid they reserved a full set of equal
   columns whether or not there were cards to fill them, so a section holding
   fewer cards than columns sat hard against the left with all the empty space
   piled on the right — and the section's own align setting could not move it,
   because 1fr tracks absorb every spare pixel. Sized by flex-basis instead:
   a full row still spans the width edge to edge, and a short row is a real
   group that left / centre / right can shift. Masonry keeps its columns. */
.pd-blk-data-combo .pd-blk-data-cskin-gridwrap:not(.pd-blk-data-cskin-masonry) {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: stretch;
    gap: 12px;
}
.pd-blk-data-combo .pd-blk-data-cskin-gridwrap:not(.pd-blk-data-cskin-masonry) > .pd-blk-data-cskin-item,
.pd-blk-data-combo .pd-blk-data-cskin-gridwrap:not(.pd-blk-data-cskin-masonry) > .pd-blk-data-link {
    /* Four to a row when there is room; the max() floor drops it to three, two
       then one as the column narrows, exactly like the combo column rules. */
    flex: 0 1 max(180px, calc((100% - 36px) / 4));
    min-width: 0;
    box-sizing: border-box;
}
/* Phone-width column: one card per row, full width — the standard mobile card
   pattern. Without this a lone card held its 180px column and floated with a
   third of a narrow screen empty either side, which reads as a mistake rather
   than a choice. */
@container (max-width: 420px) {
    .pd-blk-data-combo .pd-blk-data-cskin-gridwrap:not(.pd-blk-data-cskin-masonry) > .pd-blk-data-cskin-item,
    .pd-blk-data-combo .pd-blk-data-cskin-gridwrap:not(.pd-blk-data-cskin-masonry) > .pd-blk-data-link {
        flex: 1 1 100%;
    }
}

.pd-blk-data-combo-sec[data-pd-combo-align="center"] { text-align: center; }
.pd-blk-data-combo-sec[data-pd-combo-align="right"]  { text-align: right; }
.pd-blk-data-combo-sec[data-pd-combo-align="center"] .pd-blk-data-cskin-statgrid { justify-content: center; }
.pd-blk-data-combo-sec[data-pd-combo-align="right"]  .pd-blk-data-cskin-statgrid { justify-content: flex-end; }
.pd-blk-data-combo-sec[data-pd-combo-align="center"] .pd-blk-data-cskin-gridwrap:not(.pd-blk-data-cskin-masonry) { justify-content: center; }
.pd-blk-data-combo-sec[data-pd-combo-align="right"]  .pd-blk-data-cskin-gridwrap:not(.pd-blk-data-cskin-masonry) { justify-content: flex-end; }
/* Pill cloud — the pills already sit in a wrapping flex row, so shift the group. */
.pd-blk-data-combo-sec[data-pd-combo-align="center"] .pd-blk-data-cskin-pills { justify-content: center; }
.pd-blk-data-combo-sec[data-pd-combo-align="right"]  .pd-blk-data-cskin-pills { justify-content: flex-end; }
/* Lists — align each row's content (icon + fields) as a group; the fields stop
   stretching so there's room to shift them. Covers divided / two-line / icon /
   avatar / numbered / leaderboard lists. */
.pd-blk-data-combo-sec[data-pd-combo-align="center"] .pd-blk-data-cskin-listwrap .pd-blk-data-cskin-item { justify-content: center; }
.pd-blk-data-combo-sec[data-pd-combo-align="right"]  .pd-blk-data-cskin-listwrap .pd-blk-data-cskin-item { justify-content: flex-end; }
.pd-blk-data-combo-sec[data-pd-combo-align="center"] .pd-blk-data-cskin-listwrap .pd-blk-data-cskin-fields,
.pd-blk-data-combo-sec[data-pd-combo-align="right"]  .pd-blk-data-cskin-listwrap .pd-blk-data-cskin-fields { flex: 0 1 auto; }
/* Tables fill the width, so align their cell text instead of the block. */
.pd-blk-data-combo-sec[data-pd-combo-align="center"] .pd-blk-data-table th,
.pd-blk-data-combo-sec[data-pd-combo-align="center"] .pd-blk-data-table td { text-align: center; }
.pd-blk-data-combo-sec[data-pd-combo-align="right"]  .pd-blk-data-table th,
.pd-blk-data-combo-sec[data-pd-combo-align="right"]  .pd-blk-data-table td { text-align: right; }
.pd-blk-data-combo-sec-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.6;
    margin: 0 0 8px;
    color: var(--pd-general-color, #14141e);
}
/* Empty section placeholders — SHAPED like the layout they stand in for, so a
   template keeps the exact dimensions it'll have once data arrives. */
.pd-blk-data-combo-empty {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    padding: 20px;
    box-sizing: border-box;
    color: color-mix(in srgb, var(--pd-general-color, #14141e) 45%, transparent);
    font-size: 13px;
}
.pd-blk-data-combo-empty-txt { position: relative; z-index: 1; }
/* chart box (bar / line) + list / table share a dashed outline */
.pd-blk-data-combo-empty-chart,
.pd-blk-data-combo-empty-list {
    border: 1px dashed color-mix(in srgb, var(--pd-general-color, #14141e) 22%, transparent);
    border-radius: 12px;
}
.pd-blk-data-combo-empty-chart { min-height: 300px; }
/* pie / doughnut — a ring with the text sitting in its centre */
.pd-blk-data-combo-empty-ring { min-height: 300px; }
.pd-blk-data-combo-empty-ring .pd-blk-data-combo-empty-circle {
    width: 180px; height: 180px; border-radius: 50%;
    border: 22px solid color-mix(in srgb, var(--pd-general-color, #14141e) 10%, transparent);
    box-sizing: border-box;
}
.pd-blk-data-combo-empty-ring .pd-blk-data-combo-empty-txt {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
}
/* stat grid — a few faint mini-tiles */
.pd-blk-data-combo-empty-tiles { flex-wrap: wrap; gap: 12px; }
.pd-blk-data-combo-empty-tiles .pd-blk-data-combo-empty-tile {
    width: 110px; height: 72px; border-radius: 12px;
    border: 1px dashed color-mix(in srgb, var(--pd-general-color, #14141e) 22%, transparent);
}
.pd-blk-data-combo-empty-tiles .pd-blk-data-combo-empty-txt { flex-basis: 100%; text-align: center; }
/* lists / tables — full-width stacked faint rows */
.pd-blk-data-combo-empty-list { flex-direction: column; align-items: stretch; gap: 10px; padding: 16px; }
.pd-blk-data-combo-empty-list .pd-blk-data-combo-empty-line {
    height: 12px; border-radius: 6px;
    background: color-mix(in srgb, var(--pd-general-color, #14141e) 8%, transparent);
}
.pd-blk-data-combo-empty-list .pd-blk-data-combo-empty-txt { text-align: center; margin-top: 4px; }

/* ── Record-mode layouts ────────────────────────────────────────── */
.pd-blk-data-card {
    padding: 14px 16px;
    border: 1px solid color-mix(in srgb, var(--pd-general-color, #14141e) 12%, transparent);
    border-radius: 8px;
    /* The theme's own card/column surface — a fixed white card sat as a bright
       slab on any dark theme. */
    background: var(--pd-color-column, #ffffff);
}
.pd-blk-data-banner {
    padding: 24px 20px;
    border-radius: 10px;
    /* Accent wash over whatever surface is behind it, instead of a fixed
       near-white gradient. */
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--pd-accent, var(--pd-primary, #4f46e5)) 14%, transparent),
        color-mix(in srgb, var(--pd-accent, var(--pd-primary, #4f46e5)) 3%, transparent));
    border: 1px solid color-mix(in srgb, var(--pd-accent, var(--pd-primary, #4f46e5)) 18%, transparent);
}

/* ── Collection-mode layouts ────────────────────────────────────── */
.pd-blk-data-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.pd-blk-data-list-item {
    padding: 10px 12px;
    border-radius: 6px;
    background: color-mix(in srgb, var(--pd-general-color, #14141e) 4%, transparent);
    border: 1px solid color-mix(in srgb, var(--pd-general-color, #14141e) 9%, transparent);
}
/* Grids reflow by the COLUMN they sit in (auto-fit), never by the viewport —
   per the Page Layout formula (responsive to container, not screen). Equal-height
   rows. The min per grid sets the target count on a full-width column and drops
   the count as the column narrows (4→3→2→1) automatically. */
.pd-blk-data-grid {
    display: grid;
    gap: 12px;
    grid-auto-rows: 1fr;
}
.pd-blk-data-grid-2 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.pd-blk-data-grid-3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.pd-blk-data-grid-4 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

/* Tables — the ONLY element allowed to scroll, and only inside their OWN box, so
   a wide table never pushes the page sideways (formula rule 3 / Full tier). */
.pd-blk-data-table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.pd-blk-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.pd-blk-data-table th,
.pd-blk-data-table td {
    padding: 8px 12px;
    border-bottom: 1px solid color-mix(in srgb, var(--pd-general-color, #14141e) 11%, transparent);
    text-align: left;
}
.pd-blk-data-table th {
    background: color-mix(in srgb, var(--pd-general-color, #14141e) 6%, transparent);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: color-mix(in srgb, var(--pd-general-color, #4b5563) 72%, transparent);
}

/* ── Links inside Data blocks — inherit color, drop underline ───── */
.pd-blk-data-link {
    color: inherit;
    text-decoration: none;
}
.pd-blk-data-link:hover { text-decoration: underline; }

/* ── Equal-height grid cards (GLOBAL) ─────────────────────────────
   Grid cells already stretch to the row height, but a card wrapped in a
   link anchor kept its natural height, leaving ragged bottoms when
   neighbours' text wraps to more lines. The anchor becomes a flex shell
   and its card fills it, so every card in a grid row bottom-aligns. */
.pd-blk-data-cskin-gridwrap > .pd-blk-data-link {
    display: flex;
    min-width: 0;
}
.pd-blk-data-cskin-gridwrap > .pd-blk-data-link > [class*="pd-blk-data-cskin-"] {
    flex: 1 1 auto;
    min-width: 0;
    box-sizing: border-box;
}

/* ── Device visibility (driven by data_public.js) ───────────────── */
.pd-blk-data-hide-by-device { display: none; }

/* ── Hidden block placeholder (fallback mode = hide) ────────────── */
.pd-blk-data-hidden { display: none; }

/* ═══════════════════════════════════════════════════════════════════
   ROLE-SMART layout presets — pd-blk-data-roleskin-* namespace.
   Rendered by helpers/data_block_role_layouts_helper.php on the
   field-role contract. Single-class rules only (per-part styling
   overrides beat these at (0,0,2,0) without !important).
   ═══════════════════════════════════════════════════════════════════ */

/* Shared pill (status role) */
.pd-blk-data-roleskin-pill {
    display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px;
    font-size: 11px; font-weight: 600; line-height: 1.6; width: fit-content;
    color: var(--pd-accent, var(--pd-primary, #4f46e5));
    background: color-mix(in srgb, var(--pd-accent, var(--pd-primary, #4f46e5)) 12%, transparent);
}

/* ID Card — photo top, name, status, detail rows */
.pd-blk-data-roleskin-idcard {
    display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
    padding: 18px 16px; border-radius: 14px;
    border: 1px solid color-mix(in srgb, var(--pd-general-color, #14141e) 12%, transparent);
}
.pd-blk-data-roleskin-idcard-photo {
    display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; overflow: hidden;
    width: 64px; height: 64px; border-radius: 14px; font-weight: 700; font-size: 20px;
    color: var(--pd-accent, var(--pd-primary, #4f46e5));
    background: color-mix(in srgb, var(--pd-accent, var(--pd-primary, #4f46e5)) 15%, transparent);
}
.pd-blk-data-roleskin-idcard-name { font-size: 17px; font-weight: 700; }
.pd-blk-data-roleskin-idcard-rows { width: 100%; margin-top: 4px; }
.pd-blk-data-roleskin-idcard-rows .pd-blk-data-row {
    display: flex; justify-content: space-between; gap: 12px; padding: 5px 0;
    border-bottom: 1px solid color-mix(in srgb, var(--pd-general-color, #14141e) 7%, transparent);
}
.pd-blk-data-roleskin-idcard-rows .pd-blk-data-row:last-child { border-bottom: 0; }

/* Receipt — dashed paper, big amount */
.pd-blk-data-roleskin-receipt {
    display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
    padding: 18px 20px; border-radius: 10px;
    border: 1px dashed color-mix(in srgb, var(--pd-general-color, #14141e) 25%, transparent);
}
.pd-blk-data-roleskin-receipt-title { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; opacity: .75; }
.pd-blk-data-roleskin-receipt-amount { font-size: 30px; font-weight: 800; line-height: 1.15; }
.pd-blk-data-roleskin-receipt-date { font-size: 12px; opacity: .65; }
.pd-blk-data-roleskin-receipt-rows { width: 100%; margin-top: 8px; padding-top: 8px;
    border-top: 1px dashed color-mix(in srgb, var(--pd-general-color, #14141e) 20%, transparent); }
.pd-blk-data-roleskin-receipt-rows .pd-blk-data-row { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; font-size: 12px; }

/* Status Banner — accent-edge strip, title + date left, pill right */
.pd-blk-data-roleskin-statban {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 12px 16px; border-radius: 10px;
    border-left: 4px solid var(--pd-accent, var(--pd-primary, #4f46e5));
    background: color-mix(in srgb, var(--pd-accent, var(--pd-primary, #4f46e5)) 6%, transparent);
}
.pd-blk-data-roleskin-statban-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pd-blk-data-roleskin-statban-title { font-weight: 700; font-size: 15px; }
.pd-blk-data-roleskin-statban-date { font-size: 12px; opacity: .65; }

/* Status Board — kanban columns by status value */
.pd-blk-data-roleskin-board { display: flex; gap: 12px; align-items: flex-start; overflow-x: auto; padding-bottom: 4px; }
.pd-blk-data-roleskin-board-col {
    flex: 1 1 0; min-width: 150px; border-radius: 12px; padding: 10px;
    background: color-mix(in srgb, var(--pd-general-color, #14141e) 5%, transparent);
}
.pd-blk-data-roleskin-board-head { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    padding: 2px 4px 8px; display: flex; align-items: center; gap: 6px; }
.pd-blk-data-roleskin-board-count { font-weight: 600; font-size: 11px; padding: 0 7px; border-radius: 999px;
    background: color-mix(in srgb, var(--pd-general-color, #14141e) 10%, transparent); }
.pd-blk-data-roleskin-board-card {
    display: flex; flex-direction: column; gap: 2px; padding: 9px 10px; border-radius: 9px; margin-bottom: 8px;
    background: var(--pd-body-bg, #ffffff);
    border: 1px solid color-mix(in srgb, var(--pd-general-color, #14141e) 9%, transparent);
}
.pd-blk-data-roleskin-board-card:last-child { margin-bottom: 0; }
.pd-blk-data-roleskin-board-title { font-weight: 600; font-size: 13px; }
.pd-blk-data-roleskin-board-metric { font-size: 12px; opacity: .7; }

/* Timeline — vertical rail with dots */
.pd-blk-data-roleskin-tl { list-style: none; margin: 0; padding: 0; position: relative; }
.pd-blk-data-roleskin-tl::before { content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px;
    background: color-mix(in srgb, var(--pd-general-color, #14141e) 14%, transparent); }
.pd-blk-data-roleskin-tl-item { position: relative; padding: 0 0 14px 24px; }
.pd-blk-data-roleskin-tl-item:last-child { padding-bottom: 0; }
.pd-blk-data-roleskin-tl-dot { position: absolute; left: 0; top: 4px; width: 12px; height: 12px; border-radius: 50%;
    background: var(--pd-accent, var(--pd-primary, #4f46e5)); }
.pd-blk-data-roleskin-tl-body { display: flex; flex-direction: column; gap: 2px; }
.pd-blk-data-roleskin-tl-date { font-size: 11px; letter-spacing: .05em; text-transform: uppercase; opacity: .6; }
.pd-blk-data-roleskin-tl-title { font-weight: 600; font-size: 14px; }
.pd-blk-data-roleskin-tl .pd-blk-data-roleskin-pill { margin-top: 3px; }

/* Price List — dotted leader between name and value */
.pd-blk-data-roleskin-price { list-style: none; margin: 0; padding: 0; }
.pd-blk-data-roleskin-price-item { display: flex; align-items: baseline; gap: 8px; padding: 7px 0; }
.pd-blk-data-roleskin-price-item a { display: flex; flex: 1 1 auto; align-items: baseline; gap: 8px; text-decoration: none; color: inherit; min-width: 0; }
.pd-blk-data-roleskin-price-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-blk-data-roleskin-price-lead { flex: 1 1 auto; min-width: 16px;
    border-bottom: 2px dotted color-mix(in srgb, var(--pd-general-color, #14141e) 25%, transparent); }
.pd-blk-data-roleskin-price-val { font-weight: 700; font-size: 14px; white-space: nowrap; }

/* Team Wall — photo tiles */
.pd-blk-data-roleskin-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px; }
.pd-blk-data-roleskin-wall-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
    padding: 16px 10px; border-radius: 12px;
    border: 1px solid color-mix(in srgb, var(--pd-general-color, #14141e) 9%, transparent); }
.pd-blk-data-roleskin-wall-photo { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; overflow: hidden;
    width: 56px; height: 56px; border-radius: 50%; font-weight: 700; font-size: 18px;
    color: var(--pd-accent, var(--pd-primary, #4f46e5));
    background: color-mix(in srgb, var(--pd-accent, var(--pd-primary, #4f46e5)) 15%, transparent); }
.pd-blk-data-roleskin-wall-name { font-weight: 700; font-size: 14px; }
.pd-blk-data-roleskin-wall-cap { font-size: 12px; opacity: .65; overflow-wrap: anywhere; }

/* Value Bars — metric-scaled horizontal bars */
.pd-blk-data-roleskin-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.pd-blk-data-roleskin-bars-top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.pd-blk-data-roleskin-bars-name { font-size: 13px; font-weight: 600; }
.pd-blk-data-roleskin-bars-val { font-size: 13px; font-weight: 700; }
.pd-blk-data-roleskin-bars-track { display: block; height: 8px; border-radius: 999px; overflow: hidden;
    background: color-mix(in srgb, var(--pd-general-color, #14141e) 9%, transparent); }
.pd-blk-data-roleskin-bars-fill { display: block; height: 100%; border-radius: 999px;
    background: var(--pd-accent, var(--pd-primary, #4f46e5)); }

/* Date Cards — mini calendar tile + title */
.pd-blk-data-roleskin-dcard { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pd-blk-data-roleskin-dcard-item { display: flex; align-items: center; gap: 12px; }
.pd-blk-data-roleskin-dcard-item a { display: flex; flex: 1 1 auto; align-items: center; gap: 12px; text-decoration: none; color: inherit; min-width: 0; }
.pd-blk-data-roleskin-dcard-tile { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; flex: 0 0 auto;
    width: 48px; height: 48px; border-radius: 10px;
    color: var(--pd-accent, var(--pd-primary, #4f46e5));
    background: color-mix(in srgb, var(--pd-accent, var(--pd-primary, #4f46e5)) 12%, transparent); }
.pd-blk-data-roleskin-dcard-day { font-size: 17px; font-weight: 800; line-height: 1.1; }
.pd-blk-data-roleskin-dcard-mon { font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.pd-blk-data-roleskin-dcard-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pd-blk-data-roleskin-dcard-title { font-weight: 600; font-size: 14px; }

/* Spotlight — hero first row + compact list */
.pd-blk-data-roleskin-spot { display: flex; flex-direction: column; gap: 10px; }
.pd-blk-data-roleskin-spot-hero { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 14px;
    background: color-mix(in srgb, var(--pd-accent, var(--pd-primary, #4f46e5)) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--pd-accent, var(--pd-primary, #4f46e5)) 18%, transparent); }
.pd-blk-data-roleskin-spot-photo { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; overflow: hidden;
    width: 56px; height: 56px; border-radius: 12px; font-weight: 700; font-size: 18px;
    color: var(--pd-accent, var(--pd-primary, #4f46e5));
    background: color-mix(in srgb, var(--pd-accent, var(--pd-primary, #4f46e5)) 15%, transparent); }
.pd-blk-data-roleskin-spot-herobody { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pd-blk-data-roleskin-spot-title { font-weight: 800; font-size: 17px; }
.pd-blk-data-roleskin-spot-metric { font-weight: 700; font-size: 14px; opacity: .8; }
.pd-blk-data-roleskin-spot-list { list-style: none; margin: 0; padding: 0; }
.pd-blk-data-roleskin-spot-item { padding: 7px 2px; border-bottom: 1px solid color-mix(in srgb, var(--pd-general-color, #14141e) 8%, transparent); }
.pd-blk-data-roleskin-spot-item:last-child { border-bottom: 0; }
.pd-blk-data-roleskin-spot-item { display: flex; justify-content: space-between; gap: 12px; }
.pd-blk-data-roleskin-spot-item a { display: flex; flex: 1 1 auto; justify-content: space-between; gap: 12px; text-decoration: none; color: inherit; min-width: 0; }
.pd-blk-data-roleskin-spot-iname { font-size: 13px; font-weight: 600; }
.pd-blk-data-roleskin-spot-ival { font-size: 13px; font-weight: 700; }
