/* Shared visual language for the workspace and learning pages. */
:root { color-scheme: dark; --text-secondary: #a6b3c8; --text-muted: #9aa8be; --accent: #a5b4fc; --accent-hover: #818cf8; }
html { scroll-padding-top: 28px; }
body { background: #0a0e17; }
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
a { text-underline-offset: 4px; }
:focus-visible { outline: 2px solid #a5b4fc; outline-offset: 4px; }
button, input, select { font: inherit; }
button { min-height: 36px; }
.skip-link { position: absolute; top: -80px; left: 16px; z-index: 1000; padding: 12px 18px; background: #e0e7ff; color: #111827; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.main-container { margin: 16px 24px 28px; height: auto; min-height: 620px; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); border: 1px solid #2b3549; border-radius: 14px; overflow: hidden; box-shadow: 0 16px 48px #0002; }
.panel { min-width: 0; height: auto; }
.panel-header { min-height: 66px; gap: 12px; flex-wrap: wrap; }
.panel-title { color: #bac5d9; letter-spacing: .7px; }
.example-buttons { flex-wrap: wrap; }
.example-btn { min-height: 32px; }
.settings-toolbar { gap: 8px; flex-wrap: wrap; justify-content: flex-start; }
.settings-btn { min-height: 36px; margin-left: 0; background: #6366f1; color: #fff; }
.settings-btn-secondary { background: #1a2335; color: #d7e0f0; }
.settings-btn:hover { background: #4f46e5; color: #fff; }
.query-toolbar .settings-group { flex: 1 0 100% !important; }
.query-toolbar .settings-input { min-width: 0 !important; width: 100%; font-size: 13px; padding: 11px; }
.query-toolbar .settings-label { color: #d7e0f0; }
.query-toolbar #shareBtn { margin-left: auto; background: #1a2335; color: #d7e0f0; }
.right-panel .panel-content { min-height: 280px; max-height: 560px; }
.left-panel .panel-content { min-height: 400px; }
#jsonInput { min-height: 100%; font-size: 13px; line-height: 1.8; }
.editor-hint { color: #a6b3c8; font-size: 11px; margin-left: auto; }
.conditional-builder { padding: 12px 16px; background: #111a2b; }
.builder-heading { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 10px; }
.builder-heading h3 { font-size: 14px; }
.builder-heading a { font-size: 12px; color: #bdc7ff; }
.builder-help { color: #a6b3c8; font-size: 12px; line-height: 1.7; margin: 14px 0; }
.conditional-builder label { display: flex; flex-direction: column; gap: 5px; font-size: 11px; color: #b8c5db; min-width: 0; }
.conditional-builder input, .conditional-builder select { min-width: 0; width: 100%; height: 36px; border: 1px solid #3a4862; border-radius: 6px; background: #0b1220; color: #e2e8f0; padding: 6px 9px; font-size: 12px; }
.builder-paths { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.condition-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 1fr) 28px; gap: 8px; align-items: end; margin: 10px 0; }
.condition-row.is-unary { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) 32px; }
.condition-row button { justify-content: center; padding: 0; width: 28px; height: 36px; border-color: transparent; background: transparent; color: #a6b3c8; font-size: 20px; }
.condition-row button:hover { color: #fda4af; background: #ffffff08; }
.conditional-builder .builder-match { flex-direction: row; align-items: center; gap: 6px; }
.builder-match select { width: auto; height: 32px; }
.builder-actions, .builder-add { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
.builder-actions { margin-top: 10px; }
.builder-actions button { min-height: 32px; padding: 6px 10px; font-size: 12px; }
.builder-error { color: #fda4af; font-size: 12px; line-height: 1.6; margin: 8px 0; }
.builder-error:empty { display: none; }
.builder-heading { flex-wrap: wrap; }
.builder-heading #pickGroupValue { margin-left: auto; min-height: 30px; font-size: 11px; }
.group-selection { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid #303d54; background: #142038; }
.group-selection > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #b8c5db; font-size: 12px; }
.group-selection button { flex-shrink: 0; }
.group-picker { padding: 12px 16px; background: #111a2b; }
.group-picker .builder-heading h3 { min-width: 0; overflow-wrap: anywhere; line-height: 1.7; }
.group-picker .builder-heading code { color: #c7d2fe; font-size: 13px; }
.group-picker label { display: flex; flex-direction: column; gap: 5px; font-size: 11px; color: #b8c5db; min-width: 0; }
.group-picker select { width: 100%; min-width: 0; height: 36px; padding: 6px 9px; border: 1px solid #3a4862; border-radius: 6px; background: #0b1220; color: #e2e8f0; font-size: 12px; text-overflow: ellipsis; }
.group-choices { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 10px; }
.group-picker .builder-heading button { font-size: 11px; min-height: 30px; }
.filter-explanation { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-top: 1px solid #28364e; border-bottom: 1px solid #303d54; background: #142038; }
.filter-explanation p { flex: 1; min-width: 0; margin: 0; color: #dde5f7; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.filter-explanation button { flex-shrink: 0; gap: 6px; font-size: 12px; }
.filter-flow-dialog { width: min(880px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 24px; color: #e2e8f0; background: #101827; border: 1px solid #3b4b68; border-radius: 14px; box-shadow: 0 24px 80px #0009; overflow-y: auto; }
.filter-flow-dialog::backdrop { background: #030712b8; backdrop-filter: blur(3px); }
.flow-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.flow-heading h2 { font-size: 18px; font-weight: 600; letter-spacing: -.3px; }
.flow-heading button { flex-shrink: 0; font-size: 22px; width: 32px; padding: 0; justify-content: center; }
.flow-summary { margin: 10px 0 22px; color: #b8c5db; font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
.flow-steps { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.15fr); gap: 30px; list-style: none; padding: 0; margin: 0; align-items: start; }
.flow-step { position: relative; min-width: 0; padding: 16px; border: 1px solid #354561; border-radius: 9px; background: #0b1220; }
.flow-step:not(:last-child)::after { content: '→'; position: absolute; right: -24px; top: 45px; color: #a5b4fc; font-size: 22px; }
.flow-step-label { display: block; margin-bottom: 14px; color: #a5b4fc; font-size: 11px; font-weight: 600; }
.flow-step > code, .flow-step > p { display: block; min-height: 40px; margin: 0 0 12px; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.flow-step > strong { display: block; font-size: 13px; font-weight: 500; color: #b8c5db; }
.flow-output { background: #152338; border-color: #5966a6; }
.flow-values { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; max-height: 280px; overflow-y: auto; }
.flow-values li { padding: 8px 10px; border-radius: 5px; background: #0b1423; }
.flow-values code { display: block; white-space: pre-wrap; overflow-wrap: anywhere; color: #c7e8c1; font: 12px/1.6 'JetBrains Mono', monospace; max-height: 160px; overflow-y: auto; }
.flow-step .flow-note { color: #b8c5db; font-size: 11px; margin: 10px 0 0; min-height: 0; }
.results-panel { max-height: 340px; background: #0d1421; border-bottom: 1px solid #303d54; }
.results-header { min-height: 44px; padding: 6px 14px; gap: 12px; border-color: #263349; }
.results-heading, .results-tools { display: flex; align-items: center; gap: 8px; min-width: 0; }
.results-heading h3 { font-size: 12px; font-weight: 600; color: #d7e0f0; }
.results-count { font-size: 11px; font-weight: 500; padding: 2px 8px; border-color: #465074; background: #202a43; color: #bdc7ff; }
.results-tools .example-btn { min-height: 28px; padding: 4px 9px; font-size: 11px; }
.results-close { width: 28px; min-height: 28px; padding: 0; font-size: 20px; }
.results-scroll { min-height: 0; padding: 0 12px; scrollbar-gutter: stable; }
.results-list { display: grid; gap: 6px; margin: 0; padding: 10px 0; list-style: none; }
#jsonPathResultsList .result-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 12px; row-gap: 3px; margin: 0; padding: 10px 12px; background: #151e2e; border: 1px solid #29364d; border-radius: 8px; font-weight: 400; transition: background .15s, border-color .15s; }
#jsonPathResultsList .result-item:hover { background: #1a263b; border-color: #4b5978; }
#jsonPathResultsList .result-item.active { background: #1b2843; border-color: #818cf8; box-shadow: inset 3px 0 #818cf8; }
.result-summary { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 8px; min-width: 0; }
.results-panel .result-value { min-width: 0; font: 500 14px/1.5 'Inter', sans-serif; color: #edf2ff; white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.results-panel .result-value[data-type="array"], .results-panel .result-value[data-type="object"] { font: 12px/1.6 'JetBrains Mono', monospace; }
.results-panel .result-type { flex-shrink: 0; margin: 0; padding: 1px 6px; border: 1px solid #344259; border-radius: 4px; background: transparent; color: #aebdd3; font: 10px/1.5 'Inter', sans-serif; }
.result-detail { color: #9eacc2; font-size: 11px; }
.result-actions { display: flex; align-items: center; gap: 4px; grid-column: 2; grid-row: 1 / 3; }
.results-panel .result-action { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 30px; padding: 5px 8px; border: 1px solid #394860; border-radius: 5px; background: #121c2c; color: #bfcce2; font: 11px/1.3 'Inter', sans-serif; cursor: pointer; }
.results-panel .result-action:hover { color: #eef2ff; border-color: #8291c4; background: #263450; }
.results-panel .result-locate { width: 30px; padding: 5px; border-color: transparent; background: transparent; }
.result-actions svg, .result-path-copy svg { width: 14px; height: 14px; flex-shrink: 0; }
.results-panel .result-path-copy { grid-column: 1; justify-self: start; display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 22px; margin: 0; padding: 0; text-align: left; background: transparent; border: 0; border-radius: 3px; color: #95a6c2; cursor: pointer; }
.result-path-copy code { font: 11px/1.5 'JetBrains Mono', monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.results-panel .result-path-copy:hover { color: #c7d2fe; }
.result-path-copy:hover code { text-decoration: underline; text-underline-offset: 3px; }
.result-path-copy svg { width: 12px; height: 12px; opacity: .65; }
.results-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 14px; border-top: 1px solid #29364d; color: #aebdd3; font-size: 11px; }
.results-footer .example-btn { min-height: 28px; font-size: 11px; padding: 4px 8px; }
.results-status { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.results-status.is-error { position: static; width: auto; height: auto; margin: 0; padding: 8px 14px; clip-path: none; white-space: normal; color: #fda4af; font-size: 12px; line-height: 1.5; }
.results-panel .results-empty { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 24px 12px; font-style: normal; }
.results-empty > svg { width: 28px; height: 28px; flex-shrink: 0; color: #8495b6; }
.results-empty strong { display: block; font-size: 13px; color: #d7e0f0; font-weight: 500; }
.results-empty p { margin: 4px 0 0; color: #9cacc4; font-size: 12px; line-height: 1.5; }
#output [role="button"]:focus-visible { outline-offset: 2px; border-radius: 3px; }
button:disabled { opacity: .45; cursor: not-allowed; }
.content-inner { max-width: 1040px; padding-top: 48px; }
.feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.feature-card { padding: 22px; }
.learning-card { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px; padding: 24px; margin: 28px 0; background: linear-gradient(115deg, #17233c, #121a2b); border: 1px solid #354569; border-radius: 12px; }
.learning-card h3 { margin: 6px 0 8px; font-size: 20px; }
.learning-card p { margin: 0; }
.eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: 1.7px; font-weight: 600; color: #b2bfff; }
.content-inner .cta-link, .cta-link { display: inline-flex; align-items: center; justify-content: center; padding: 11px 16px; background: #6366f1; color: #fff; border-radius: 7px; text-decoration: none; font-size: 13px; font-weight: 600; white-space: nowrap; }
.cta-link:hover { background: #4f46e5; text-decoration: none; }
.content { max-width: 960px; padding: 42px 28px 64px; margin: auto; }
.content h1 { font-size: clamp(30px, 4vw, 46px); line-height: 1.18; letter-spacing: -1.4px; margin: 16px 0; }
.content h2 { font-size: 25px; line-height: 1.35; margin: 46px 0 16px; letter-spacing: -.6px; }
.content h3 { font-size: 19px; margin: 28px 0 12px; }
.content p, .content li { font-size: 15px; line-height: 1.85; color: #b1bdd1; }
.content p { margin-bottom: 16px; }
.content a { color: #b4c1ff; }
.content .cta-link { color: #fff; }
.content .article-lead { font-size: 18px; line-height: 1.75; }
.content .updated-date { font-size: 12px; color: #9cabc2; margin-bottom: 24px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 9px; font-size: 12px; color: #9cabc2; margin-bottom: 28px; }
.breadcrumbs a { text-decoration: none; }
.contents-nav { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 24px 0 32px; padding: 18px 0; border-block: 1px solid #29364c; font-size: 13px; }
.contents-nav a { text-decoration: none; }
.article-callout { background: #121d30; border-left: 3px solid #818cf8; padding: 20px 24px; margin: 28px 0; border-radius: 0 8px 8px 0; }
.article-callout p:last-child { margin: 0; }
.content pre { overflow-x: auto; background: #0c1321; border: 1px solid #2c3a53; border-radius: 9px; padding: 20px; margin: 18px 0; line-height: 1.8; }
.content pre code { background: none; border: 0; padding: 0; color: #c7d2fe; font: 12px/1.8 'JetBrains Mono', monospace; }
.content code { overflow-wrap: anywhere; }
.content pre code { overflow-wrap: normal; }
.content ul, .content ol { padding-left: 24px; }
.content .examples-list, .content .steps-list { padding-left: 0; }
.syntax-table th { color: #b1bed4; }
.content .site-footer { margin-top: 40px; }
.site-footer { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 20px; padding: 28px 24px; border-top: 1px solid #263145; color: #9cabc2; background: #0d1320; font-size: 12px; }
.site-footer a { color: #b4c1ff; text-decoration: none; }
.error { max-width: min(520px, calc(100vw - 32px)); overflow-wrap: anywhere; }
@media (max-width: 1100px) {
    .main-container { grid-template-columns: 1fr; grid-template-rows: auto auto; }
    .left-panel { border-right: 0; border-bottom: 1px solid #2b3549; }
    .left-panel .panel-content { height: 320px; min-height: 320px; flex: none; }
    .right-panel .panel-content { min-height: 380px; }
    .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .main-container { margin: 12px 12px 24px; border-radius: 10px; }
    .panel-header { padding: 12px; }
    .panel-title { width: 100%; }
    .editor-hint { display: none; }
    .query-toolbar .settings-group { flex-wrap: wrap; }
    .query-toolbar .settings-input { flex-basis: 100% !important; }
    .query-toolbar { display: grid; grid-template-columns: 1fr 1fr; }
    .query-toolbar .settings-group { grid-column: 1 / -1; }
    .query-toolbar .settings-btn { justify-content: center; }
    .query-toolbar #shareBtn { margin-left: 0; }
    .conditional-builder, .group-picker { padding: 12px; }
    .builder-heading #pickGroupValue { margin-left: 0; }
    .condition-row, .condition-row.is-unary { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 28px; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid #303d54; }
    .condition-row .condition-field { grid-column: 1 / 3; }
    .condition-row button { grid-column: 3; grid-row: 1; width: 28px; }
    .condition-row .condition-operator { grid-column: 1; grid-row: 2; }
    .condition-row .condition-value { grid-column: 2 / 4; grid-row: 2; }
    .condition-row.is-unary .condition-operator { grid-column: 1 / -1; }
    .filter-explanation { padding: 10px 12px; gap: 8px; }
    .filter-flow-dialog { padding: 18px; }
    .flow-steps { grid-template-columns: 1fr; gap: 26px; }
    .flow-step { padding: 12px 14px; }
    .flow-step:not(:last-child)::after { content: '↓'; right: calc(50% - 7px); top: auto; bottom: -26px; }
    .flow-step-label { margin-bottom: 8px; }
    .flow-step > code, .flow-step > p { min-height: 0; margin-bottom: 6px; }
    .results-header { padding-inline: 12px; }
    .results-scroll { padding-inline: 8px; }
    #jsonPathResultsList .result-item { padding: 9px 10px; column-gap: 6px; }
    .results-panel .result-action { min-height: 32px; padding-inline: 6px; }
    .results-panel .result-locate { width: 32px; }
    .results-panel .result-value { font-size: 13px; }
    .feature-grid, .learning-card { grid-template-columns: 1fr; }
    .learning-card { padding: 20px; }
    .learning-card .cta-link { justify-self: start; }
    .content { padding: 28px 20px 44px; }
    .content-inner { padding: 36px 20px; }
    .content .article-lead { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
