/* The same scoped design applies to page instances and the private review page. */
.jp-civic-module.jp-home { background:none; }
.jp-civic-journey { margin:0; }
.jp-home>.wp-block-post-content { margin:0; max-width:none; }
.jp-main:has(.jp-civic-module) { width:100%;max-width:none; }
.jp-main:has(.jp-civic-module)>.wp-block-post-title,
.jp-main:has(.jp-civic-module)>.wp-block-post-content>:not(.jp-civic-module) { width:min(calc(100% - 2 * var(--gutter)),var(--width-content));max-width:var(--width-content);margin-inline:auto; }
.jp-main:has(.jp-civic-module)>.wp-block-post-content { max-width:none; }
.jp-main:has(.jp-civic-module) .jp-civic-journey { width:min(calc(100% - 2 * var(--gutter)),var(--width-content));margin-inline:auto; }
.jp-civic-module .jp-hero { display:grid; }
.jp-civic-module :is(p,h2,h3,h4) { overflow-wrap:break-word; }
/* Only the authoring canvas gets handles, grouping and descriptive labels. */
.editor-styles-wrapper .jp-civic-edit { position:relative; max-width:var(--width-content); border:1px dashed var(--border-control,#a0a0a0);border-radius:.5rem;margin-block:1.5rem;padding-top:2rem; }
.editor-styles-wrapper .jp-civic-editor-label { position:absolute;top:0;left:.5rem;background:var(--surface-content,#fff);color:var(--color-text-primary,#222);font:600 12px/1.5 sans-serif;padding:.25rem .5rem;z-index:1; }
.editor-styles-wrapper .jp-civic-field { padding:1.5rem .5rem .5rem; }
.editor-styles-wrapper .jp-civic-station { padding:1.5rem 1rem 0; }
.editor-styles-wrapper .jp-civic-expertise .block-editor-block-list__layout { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem; }
.editor-styles-wrapper .jp-civic-expertise .block-editor-inner-blocks .wp-block { max-width:none;margin:0;min-width:0; }
.editor-styles-wrapper .jp-civic-journey .block-editor-inner-blocks .wp-block { max-width:none; }
.editor-styles-wrapper .jp-civic-expertise .block-list-appender { position:relative;grid-column:1/-1; }
.editor-styles-wrapper .jp-hero-photo .components-button { margin:.5rem; }
.editor-styles-wrapper .jp-hero-photo:has(.components-button) { aspect-ratio:auto; }
.editor-styles-wrapper .jp-hero-photo img { aspect-ratio:16/10;height:auto;max-height:18rem;object-fit:cover; }
@media(max-width:47.999rem){.editor-styles-wrapper .jp-civic-expertise .block-editor-block-list__layout{grid-template-columns:1fr}}
.jp-home>.wp-block-post-content>.jp-civic-module { margin-block:0; }
.jp-main:has(.jp-civic-module)>.wp-block-post-content>.jp-civic-module { width:100%;max-width:none; }

/* Shared metric card: legacy Case HTML and native Civic instances. */
.jp-metric{background:var(--surface-canvas);border:1px solid var(--border-subtle);border-radius:var(--radius-panel);padding:clamp(1.25rem,3vw,2.5rem)}
.jp-metric-value{display:block;font-size:clamp(2.75rem,5vw,5rem);line-height:1.1;letter-spacing:-.065em;color:var(--color-human);font-weight:500}
.jp-metric h3{font-size:1.125rem;margin:.75rem 0 1.5rem}
.jp-metric dl{margin:0;display:grid;gap:.75rem}
.jp-metric dl div{padding-top:.75rem;border-top:var(--border-default)}
.jp-metric dt{font-size:.8125rem;color:var(--color-text-secondary)}
.jp-metric dd{margin:.25rem 0 0;font-size:.9375rem;line-height:1.5}
.jp-metric>p{font-size:.9375rem;border-left:3px solid var(--color-annotation);padding-left:.75rem;margin-bottom:0}
.jp-case-metric { box-sizing:border-box;min-width:0;color:var(--color-text-primary);overflow-wrap:anywhere; }
.jp-civic-case-metric { margin-block:1.5rem; }
.jp-civic-case-metric>.jp-case-metric { width:min(calc(100% - 2 * var(--gutter)),var(--width-content));margin-inline:auto; }
.jp-case-metric :is(.jp-metric-value,h3,dd) { overflow-wrap:anywhere; }
.jp-case-metric h3:last-child { margin-bottom:0; }
.jp-case-metric dd { white-space:pre-line; }
.editor-styles-wrapper .jp-civic-case-metric>.jp-case-metric { width:100%;border:0;background:none; }
.editor-styles-wrapper .jp-civic-case-metric .jp-civic-editor-label { max-width:calc(100% - 1rem);box-sizing:border-box;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
@media(forced-colors:active){.jp-case-metric{border:1px solid CanvasText}}
