/* DGCS Studio light theme: custom properties transcribed from the design system's tokens.json (v1.0, light values),
   plus the Geist faces and the 12 type styles the components use. */
@font-face { font-family: "Geist"; src: url("ds/dgcs/fonts/Geist-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist"; src: url("ds/dgcs/fonts/Geist-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist"; src: url("ds/dgcs/fonts/Geist-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist"; src: url("ds/dgcs/fonts/Geist-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("ds/dgcs/fonts/GeistMono-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("ds/dgcs/fonts/GeistMono-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

:root, [data-theme="light"] {
  color-scheme: light;
  --font-sans: Geist, Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --brand-charcoal: #151922; --brand-blue: #397BFA; --brand-blue-hover: #2F6BE6; --brand-blue-pressed: #2459CC; --brand-blue-subtle: #EAF1FF;
  --brand-violet: #8C72F8; --brand-violet-hover: #7A5FF2; --brand-violet-pressed: #6E52E6; --brand-violet-subtle: #F1EEFE;
  --brand-canvas: #F5F7FB; --brand-white: #FFFFFF;

  --bg-app: #F5F7FB; --bg-subtle: #EEF1F6; --bg-canvas-surround: #E9ECF2;
  --surface-panel: #FFFFFF; --surface-raised: #FFFFFF; --surface-overlay: #FFFFFF; --surface-sunken: #F0F2F7; --surface-hover: #EEF1F6; --surface-pressed: #E5E9F0;

  --text-primary: #151922; --text-secondary: #4A5263; --text-muted: #646C7E; --text-disabled: #A3AAB8; --text-on-accent: #FFFFFF; --text-link: #2A62D9; --text-inverse: #F3F5F9;
  --border-subtle: #E3E7EE; --border-default: #D3D8E1; --border-strong: #7D8697; --border-divider: #E3E7EE;

  --action-primary: #2F6BE6; --action-primary-hover: #2459CC; --action-primary-pressed: #1D4BB0; --action-primary-text: #FFFFFF;
  --action-secondary: #FFFFFF; --action-secondary-hover: #F0F2F7; --action-secondary-pressed: #E5E9F0; --action-secondary-text: #151922;
  --action-ghost-hover: #EEF1F6; --action-ghost-pressed: #E5E9F0;
  --action-selected: #E7EFFE; --action-selected-text: #2A62D9;
  --action-disabled: #EEF1F5; --action-disabled-text: #A3AAB8; --action-disabled-border: #E3E7EE;
  --action-indicator: #2F6BE6; --action-indicator-hover: #2459CC;
  --focus-ring: #397BFA; --focus-ring-offset: #FFFFFF;
  --accent-violet: #6E52E6; --accent-violet-subtle: #F1EEFE;

  --editor-selection: #397BFA; --editor-selection-fill: rgba(57, 123, 250, 0.08); --editor-hover-outline: rgba(57, 123, 250, 0.6);
  --editor-bounding-box: #397BFA; --editor-handle-fill: #FFFFFF; --editor-handle-border: #397BFA;
  --editor-guide: #8C72F8; --editor-snap: #E0286E; --editor-snap-label: #D61F63; --editor-group-outline: #8C72F8;
  --editor-layer-active: #E7EFFE; --editor-layer-active-text: #2A62D9; --editor-layer-hover: #EEF1F6;
  --editor-canvas-boundary: rgba(21, 25, 34, 0.16); --editor-bleed: #E5484D; --editor-safe-area: #0E8A8A; --editor-artboard: #FFFFFF;

  --success-text: #13794A; --success-bg: #E8F6EE; --success-border: #A8DDBF; --success-solid: #15803D; --success-on-solid: #FFFFFF;
  --warning-text: #8A5300; --warning-bg: #FFF5E0; --warning-border: #F2D08A; --warning-solid: #F5A524; --warning-on-solid: #151922;
  --error-text: #C6283A; --error-bg: #FDECEE; --error-border: #F4B7BF; --error-solid: #D22B3E; --error-solid-hover: #B92637; --error-solid-pressed: #A0212F; --error-on-solid: #FFFFFF;
  --info-text: #1F5AD6; --info-bg: #EAF1FF; --info-border: #B8CFFD; --info-solid: #2F6BE6; --info-on-solid: #FFFFFF;
  --overlay-scrim: rgba(10, 12, 17, 0.48);

  --space-0: 0px; --space-0\.5: 2px; --space-1: 4px; --space-1\.5: 6px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px;
  --space-6: 24px; --space-8: 32px; --space-10: 40px; --space-12: 48px; --space-16: 64px; --space-20: 80px; --space-24: 96px;
  --toolbar-gap: 4px; --toolbar-group-gap: 8px; --toolbar-padding: 6px; --toolbar-button-padding: 6px;
  --inspector-label-gap: 4px; --inspector-field-gap: 8px; --inspector-row-gap: 12px; --inspector-group-gap: 16px;
  --panel-padding: 12px; --panel-padding-lg: 16px;
  --nav-item-padding-x: 8px; --nav-item-padding-y: 6px; --nav-item-gap: 2px; --nav-icon-gap: 8px; --nav-category-gap: 16px;
  --menu-padding: 4px; --menu-item-padding-x: 8px; --menu-item-padding-y: 6px; --menu-separator-margin: 4px; --menu-offset: 4px;
  --popover-padding: 12px; --dialog-padding: 24px; --dialog-padding-lg: 32px; --dialog-gap: 16px; --dialog-actions-gap: 8px; --dialog-viewport-margin: 16px;
  --card-padding: 16px; --card-padding-lg: 24px; --card-gap: 16px; --content-section-gap: 32px;
  --layout-gutter-mobile: 16px; --layout-gutter-tablet: 24px; --layout-gutter-desktop: 32px;
  --target-editor: 24px; --target-desktop: 32px; --target-touch: 44px; --target-touch-lg: 48px;

  --radius-none: 0px; --radius-xs: 4px; --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px; --radius-xl: 20px; --radius-2xl: 24px; --radius-full: 9999px;
  --radius-button: 9999px; --radius-icon-button: 9999px; --radius-search: 9999px; --radius-chip: 9999px;
  --radius-toolbar-button: 8px; --radius-toolbar: 16px; --radius-input: 12px; --radius-inspector-field: 8px; --radius-select: 12px;
  --radius-menu: 16px; --radius-menu-item: 12px; --radius-panel: 16px; --radius-card: 20px; --radius-dialog: 24px; --radius-tooltip: 8px; --radius-canvas: 0px;

  --control-height-sm: 28px; --control-height-md: 32px; --control-height-lg: 40px;
  --icon-size-xs: 14px; --icon-size-sm: 16px; --icon-size-md: 18px; --icon-size-lg: 20px; --icon-size-xl: 24px; --icon-size-2xl: 32px;

  --shadow-none: none;
  --shadow-xs: 0 1px 2px rgba(21, 25, 34, 0.06);
  --shadow-sm: 0 1px 2px rgba(21, 25, 34, 0.04), 0 2px 6px rgba(21, 25, 34, 0.06);
  --shadow-md: 0 2px 4px rgba(21, 25, 34, 0.04), 0 6px 16px rgba(21, 25, 34, 0.08);
  --shadow-lg: 0 4px 8px rgba(21, 25, 34, 0.04), 0 12px 32px rgba(21, 25, 34, 0.12);
  --shadow-xl: 0 8px 16px rgba(21, 25, 34, 0.06), 0 24px 56px rgba(21, 25, 34, 0.16);
  --shadow-focus: 0 0 0 2px #ffffff, 0 0 0 4px #397bfa;
  --shadow-canvas: 0 0 0 1px rgba(21, 25, 34, 0.08), 0 2px 8px rgba(21, 25, 34, 0.08);
  --shadow-button: none; --shadow-button-hover: 0 1px 2px rgba(21, 25, 34, 0.06); --shadow-button-pressed: none; --shadow-input: none;
  --shadow-toolbar: 0 2px 4px rgba(21, 25, 34, 0.04), 0 6px 16px rgba(21, 25, 34, 0.08);
  --shadow-menu: 0 1px 2px rgba(21, 25, 34, 0.04), 0 2px 6px rgba(21, 25, 34, 0.06);
  --shadow-popover: 0 2px 4px rgba(21, 25, 34, 0.04), 0 6px 16px rgba(21, 25, 34, 0.08);
  --shadow-tooltip: 0 1px 2px rgba(21, 25, 34, 0.04), 0 2px 6px rgba(21, 25, 34, 0.06);
  --shadow-card: 0 1px 2px rgba(21, 25, 34, 0.06);
  --shadow-card-hover: 0 1px 2px rgba(21, 25, 34, 0.04), 0 2px 6px rgba(21, 25, 34, 0.06);
  --shadow-dialog: 0 4px 8px rgba(21, 25, 34, 0.04), 0 12px 32px rgba(21, 25, 34, 0.12);
  --shadow-drag: 0 4px 8px rgba(21, 25, 34, 0.04), 0 12px 32px rgba(21, 25, 34, 0.12);
  --shadow-sidebar: none;
  --shadow-artboard: 0 0 0 1px rgba(21, 25, 34, 0.08), 0 2px 8px rgba(21, 25, 34, 0.08);
}

/* Dark theme: tokens.json dark values. Token references ({surface-hover} etc.) are re-declared with their
   resolved dark values so they don't inherit the light ones. Brand, editor-chrome and status-solid tokens
   keep their values in both themes and are not repeated. */
[data-theme="dark"] {
  color-scheme: dark;
  --brand-blue-subtle: #16244A; --brand-violet-subtle: #231F3D;
  --bg-app: #151922; --bg-subtle: #11141B; --bg-canvas-surround: #0E1116;
  --surface-panel: #1B2029; --surface-raised: #222834; --surface-overlay: #29303D; --surface-sunken: #12151C; --surface-hover: #262C38; --surface-pressed: #2E3543;
  --text-primary: #F3F5F9; --text-secondary: #B4BBC8; --text-muted: #949CAB; --text-disabled: #555D6C; --text-link: #6E9DFC; --text-inverse: #151922;
  --border-subtle: #262C37; --border-default: #313846; --border-strong: #768092; --border-divider: #262C37;
  --action-secondary: #232935; --action-secondary-hover: #2A3140; --action-secondary-pressed: #323A49; --action-secondary-text: #F3F5F9;
  --action-ghost-hover: #262C38; --action-ghost-pressed: #2E3543;
  --action-selected: #1E2C4A; --action-selected-text: #8AB0FD;
  --action-disabled: #1F242E; --action-disabled-text: #555D6C; --action-disabled-border: #2A303B;
  --action-indicator: #397BFA; --action-indicator-hover: #4A87FB;
  --focus-ring: #5B92FB; --focus-ring-offset: #151922;
  --accent-violet: #A895FA; --accent-violet-subtle: #231F3D;
  --editor-layer-active: #1E2C4A; --editor-layer-active-text: #8AB0FD; --editor-layer-hover: #262C38;
  --editor-canvas-boundary: rgba(255, 255, 255, 0.14);
  --success-text: #4CC98A; --success-bg: #12271D; --success-border: #1E4A34;
  --warning-text: #F5B748; --warning-bg: #2D2210; --warning-border: #5A4214;
  --error-text: #FF7A86; --error-bg: #32161B; --error-border: #5E2530;
  --info-text: #7FA8FD; --info-bg: #142240; --info-border: #24407A;
  --overlay-scrim: rgba(0, 0, 0, 0.6);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.32);
  --shadow-sm: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 2px 6px rgba(0, 0, 0, 0.36);
  --shadow-md: 0 0 0 1px rgba(255, 255, 255, 0.07), 0 4px 12px rgba(0, 0, 0, 0.40);
  --shadow-lg: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 12px 32px rgba(0, 0, 0, 0.50);
  --shadow-xl: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 24px 56px rgba(0, 0, 0, 0.56);
  --shadow-focus: 0 0 0 2px #151922, 0 0 0 4px #5b92fb;
  --shadow-canvas: 0 0 0 1px rgba(255, 255, 255, 0.10), 0 4px 16px rgba(0, 0, 0, 0.40);
  --shadow-button-hover: 0 1px 2px rgba(0, 0, 0, 0.32);
  --shadow-toolbar: 0 0 0 1px rgba(255, 255, 255, 0.07), 0 4px 12px rgba(0, 0, 0, 0.40);
  --shadow-menu: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 2px 6px rgba(0, 0, 0, 0.36);
  --shadow-popover: 0 0 0 1px rgba(255, 255, 255, 0.07), 0 4px 12px rgba(0, 0, 0, 0.40);
  --shadow-tooltip: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 2px 6px rgba(0, 0, 0, 0.36);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.32);
  --shadow-card-hover: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 2px 6px rgba(0, 0, 0, 0.36);
  --shadow-dialog: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 12px 32px rgba(0, 0, 0, 0.50);
  --shadow-drag: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 12px 32px rgba(0, 0, 0, 0.50);
  --shadow-artboard: 0 0 0 1px rgba(255, 255, 255, 0.10), 0 4px 16px rgba(0, 0, 0, 0.40);
}

/* Type styles (tokens.json → type.groups) */
.display { font: 600 2.5rem/3rem var(--font-sans); letter-spacing: -0.02em; }
.page-title { font: 600 1.75rem/2.25rem var(--font-sans); letter-spacing: -0.015em; }
.section-heading { font: 600 1.25rem/1.75rem var(--font-sans); letter-spacing: -0.01em; }
.panel-heading { font: 600 1rem/1.5rem var(--font-sans); letter-spacing: -0.005em; }
.body-large { font: 400 1rem/1.5rem var(--font-sans); }
.body { font: 400 0.875rem/1.3125rem var(--font-sans); }
.body-small { font: 400 0.8125rem/1.25rem var(--font-sans); }
.caption { font: 400 0.6875rem/1rem var(--font-sans); letter-spacing: 0.01em; }
.control-label { font: 500 0.75rem/1rem var(--font-sans); letter-spacing: 0.005em; }
.button-text { font: 500 0.8125rem/1.125rem var(--font-sans); }
.navigation-label { font: 500 0.8125rem/1.25rem var(--font-sans); }
.technical-value { font: 500 0.75rem/1.125rem var(--font-mono); font-variant-numeric: tabular-nums; }

/* Layout helper: lets a docked design-system panel fill its slot's height so its body scrolls. */
.dgcs-fill { height: 100%; }

/* App-level fix: an open inspector section must not clip dropdown lists (Select) that extend past it.
   CollapsibleSection keeps overflow:hidden for its open/close animation; only an open section is released. */
.dg-cs.is-open > .dg-cs__body > .dg-cs__inner { overflow: visible; }
