.schema-workbench { --schema-ink: #172b4d; --schema-muted: #52647d; color: var(--schema-ink); padding: 24px; border: 1px solid #d8e1ed; border-radius: 16px; background: #fff; }
.schema-workbench h2 { font-size: 1.6rem; margin: 8px 0; }
.schema-workbench h3 { font-size: 1.1rem; }
.schema-workbench h4 { font-size: 1rem; margin: 6px 0; }
.schema-workbench p { color: var(--schema-muted); }
.schema-heading, .schema-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.schema-heading { justify-content: space-between; }
.schema-toolbar { margin: 12px 0; }
.schema-workbench label { margin: 0; color: var(--schema-ink); font-size: .85rem; font-weight: 600; }
.schema-workbench select, .schema-workbench input { min-height: 40px; border: 1px solid #bdcadd; border-radius: 7px; background: #fff; padding: 8px; max-width: 100%; color: var(--schema-ink); }
.schema-editor { background: #f5f8fc; padding: 16px; border-radius: 10px; margin: 20px 0; }
.schema-workbench summary { cursor: pointer; font-weight: 600; padding: 8px 0; color: var(--schema-ink); }
.schema-editor label { display: block; margin: 12px 0 6px; }
.schema-editor textarea { width: 100%; min-height: 180px; resize: vertical; font: 13px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--schema-ink); background: #fff; border: 1px solid #bdcadd; border-radius: 8px; padding: 12px; tab-size: 2; }
.schema-workbench :focus-visible { outline: 3px solid #376dcc; outline-offset: 3px; }
#schema-notice:not(:empty) { padding: 12px 16px; background: #edf5ff; border-left: 3px solid #376dcc; margin: 16px 0; }
.schema-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 20px 0 12px; }
.schema-metrics > div { padding: 14px; border: 1px solid #d8e1ed; border-radius: 10px; background: #f8fafd; }
.schema-metrics strong { display: block; font-size: 1.8rem; }
.schema-metrics span { font-size: .8rem; }
.schema-layout { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); gap: 16px; align-items: start; }
.schema-entities, .schema-detail, .schema-source { min-width: 0; border: 1px solid #d8e1ed; border-radius: 10px; padding: 14px; }
.schema-entities { max-height: 800px; overflow: auto; background: #f8fafd; }
.schema-entity { display: block; width: 100%; text-align: left; border: 1px solid #d8e1ed; border-radius: 8px; background: white; color: var(--schema-ink); margin: 0 0 8px; padding: 12px; cursor: pointer; overflow-wrap: anywhere; }
.schema-entity strong, .schema-entity small, .schema-entity-name { display: block; }
.schema-entity small { font-size: .73rem; margin-top: 6px; }
.schema-entity-name { font-size: .8rem; max-height: 3.4em; overflow: hidden; }
.schema-entity[aria-pressed="true"] { border-color: #285ec0; background: #edf4ff; box-shadow: inset 3px 0 #285ec0; }
.schema-entity--error { border-color: #b83b48; }
.schema-detail { scroll-margin-top: 90px; overflow-wrap: anywhere; }
.schema-guidance { font-size: .85rem; background: #f5f8fc; border-radius: 6px; padding: 10px; margin-top: 12px; }
.schema-path { display: block; overflow-wrap: anywhere; white-space: normal; color: #52647d; font-size: .75rem; }
.schema-action { color: #2057ad; background: transparent; border: 0; padding: 8px 0; text-align: left; text-decoration: underline; cursor: pointer; font-size: .8rem; }
.schema-issue { border-top: 1px solid #d8e1ed; padding: 16px 0; margin-top: 12px; }
.schema-issue p, .schema-issue details { font-size: .85rem; }
.schema-status { font-size: .7rem; text-transform: uppercase; font-weight: 700; letter-spacing: .04em; color: #67501a; }
.schema-issue--error .schema-status, .schema-issue--warning .schema-status { color: #a3323e; }
.schema-issue--info .schema-status { color: #52647d; }
.schema-workbench pre { padding: 12px; background: #f5f8fc; border: 1px solid #d8e1ed; border-radius: 6px; font-size: 12px; max-height: 350px; overflow: auto; text-align: left; }
.schema-scope p { font-size: .85rem; }
.schema-findings { display: grid; grid-template-columns: minmax(150px,.7fr) minmax(0,1fr); gap: 12px; min-width: 0; }
.schema-source .CodeMirror { height: 65vh; min-height: 400px; font: 13px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace; border: 1px solid #d8e1ed; border-radius: 6px; }
.schema-source .CodeMirror pre.CodeMirror-line, .schema-source .CodeMirror pre.CodeMirror-line-like { padding: 0 4px; margin: 0; border: 0; border-radius: 0; background: transparent; font: inherit; max-height: none; overflow: visible; }
.schema-source .CodeMirror textarea { min-height: 0; }
.schema-source { position: sticky; top: 90px; }
@media (max-width: 1000px) { .schema-layout { grid-template-columns: minmax(0,1fr); } .schema-source { position: static; } .schema-source .CodeMirror { height: 55vh; } }
@media (max-width: 680px) { .schema-workbench { padding: 14px; } .schema-findings { grid-template-columns: minmax(0,1fr); } .schema-entities { max-height: 250px; } .schema-metrics { grid-template-columns: repeat(2,1fr); } }

.marketing-tool-v2 .schema-workbench pre code { color: #213c61; background: transparent; }

.marketing-tool-v2 .schema-workbench .btn-outline-secondary { color: #314966; border-color: #798ba5; }
.marketing-tool-v2 .schema-workbench code.schema-path { color: #495d78; }
.schema-workbench-input textarea { width: 100%; }
.schema-workbench-input select { padding: 9px; border: 1px solid #bdcadd; border-radius: 7px; max-width: 100%; }
.schema-toolbar [aria-pressed="true"] { background: #2459b3; color: #fff; border-color: #2459b3; }
.schema-workbench { scroll-margin-top: 90px; }
@media (min-width: 1001px) {
    #schema-workbench { width: calc(100vw - 48px); max-width: none; margin-inline-start: calc(50% - 50vw + 24px); }
}
