/* Champion Studio: tokens only (frame.css). The editor fills #main: top bar, tool strip, artboard, side panels, status bar. */
.studio { display: grid; grid-template-columns: 44px 1fr 300px; grid-template-rows: 44px 1fr 26px; grid-template-areas: "top top top" "tools canvas side" "status status status"; height: 100%; min-height: 0; background: var(--ground); }
.studio:focus-visible { box-shadow: inset 0 0 0 2px var(--focus); }
.st-top { grid-area: top; display: flex; align-items: center; gap: 8px; padding: 0 12px; background: var(--chrome); border-bottom: 1px solid var(--hair); white-space: nowrap; overflow: hidden; }
.st-top .btn { flex: none; }
.st-name { font: 600 14px/1 var(--f-ui); border: 1px solid transparent; background: transparent; color: var(--text); padding: 6px 8px; border-radius: var(--r-ctl); min-width: 200px; }
.st-name:hover, .st-name:focus { border-color: var(--hair-2); background: var(--sheet); }
.st-save { font-size: 12px; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.st-tools { grid-area: tools; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; background: var(--chrome); border-right: 1px solid var(--hair); }
.st-tool { width: 32px; height: 32px; border: 0; border-radius: var(--r-ctl); background: transparent; color: var(--text-2); display: grid; place-items: center; cursor: pointer; }
.st-tool:hover { background: var(--sheet-2); color: var(--text); }
.st-tool.on { background: var(--poseidon); color: var(--sheet); }
.st-tool .ic { width: 18px; height: 18px; }
.st-canvas-host { grid-area: canvas; min-width: 0; min-height: 0; position: relative; }
.st-canvas { position: absolute; inset: 0; overflow: hidden; background: var(--ground); }
.st-canvas[data-tool="hand"], .st-canvas.st-grab { cursor: grab; }
.st-canvas[data-tool="rect"], .st-canvas[data-tool="ellipse"], .st-canvas[data-tool="polygon"], .st-canvas[data-tool="star"], .st-canvas[data-tool="line"], .st-canvas[data-tool="pen"] { cursor: crosshair; }
.st-canvas[data-tool="text"] { cursor: text; }
.st-canvas[data-tool="zoom"] { cursor: zoom-in; }
.st-svg { position: absolute; left: 20px; top: 20px; width: calc(100% - 20px); height: calc(100% - 20px); touch-action: none; user-select: none; }
.st-ruler { position: absolute; left: 0; top: 0; pointer-events: none; }
.st-ruler-left { top: 0; } .st-ruler-corner { position: absolute; left: 0; top: 0; width: 20px; height: 20px; background: var(--sheet-2); border-right: 1px solid var(--hair-2); border-bottom: 1px solid var(--hair-2); }
.st-ab { fill: var(--sheet); stroke: var(--hair-2); stroke-width: 1; vector-effect: non-scaling-stroke; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .12)); }
.st-bleed { fill: none; stroke: var(--danger); stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; opacity: .6; }
.st-grid { fill: none; stroke: var(--hair); stroke-width: 1; }
.st-items .st-locked { pointer-events: none; }
.st-overlay { pointer-events: none; }
.st-overlay .st-handle { pointer-events: all; }
.st-selbox { fill: none; stroke: var(--focus); stroke-width: 1; }
.st-selmain { stroke-width: 1.5; }
.st-hover { fill: none; stroke: var(--focus); stroke-width: 1; opacity: .6; }
.st-handle { fill: var(--sheet); stroke: var(--focus); stroke-width: 1.5; }
.st-rot { fill: var(--accent); stroke: var(--sheet); cursor: alias; }
.st-rotline { stroke: var(--focus); stroke-width: 1; }
.st-guide { stroke: var(--accent); stroke-width: 1; stroke-dasharray: 4 2; }
.st-marquee { fill: var(--focus); fill-opacity: .08; stroke: var(--focus); stroke-width: 1; stroke-dasharray: 3 2; }
.st-penpreview { fill: none; stroke: var(--focus); stroke-width: 1; stroke-dasharray: 3 2; }
.st-handleline { stroke: var(--accent); stroke-width: 1; }
.st-anchor { fill: var(--sheet); stroke: var(--accent); stroke-width: 1.5; pointer-events: all; cursor: move; }
.st-anchor.on { fill: var(--accent); }
.st-hnd { fill: var(--sheet); stroke: var(--accent); stroke-width: 1.5; pointer-events: all; cursor: crosshair; }
.st-canvas[data-tool="node"] { cursor: default; }
.st-textedit { position: absolute; margin: 0; padding: 0; border: 1px dashed var(--focus); background: transparent; resize: none; overflow: hidden; white-space: pre; outline: 2px solid transparent; font-family: var(--f-ui); }
.st-side { grid-area: side; overflow: auto; background: var(--chrome); border-left: 1px solid var(--hair); padding: 10px 12px 40px; }
.st-side h3 { font: 600 11px/1 var(--f-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); margin: 14px 0 8px; }
.st-side h3:first-child { margin-top: 2px; }
.st-panel .f { margin-bottom: 8px; }
.st-panel .f label { font-size: 11px; color: var(--text-2); }
.st-panel input[type="number"], .st-panel input[type="text"], .st-panel select, .st-panel textarea { width: 100%; font-size: 12px; padding: 4px 6px; }
.st-num { gap: 6px; }
/* the Studio's own compact number rows only (.grid3.st-num): a bare .grid3 here overrode every HQ form, so Settings and the
   quote editor kept three squashed columns on a phone (small-screen check, 31 Oct 2026) */
.grid3.st-num { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 8px; }
.st-align .btn, .st-panel .bar .btn.small { padding: 4px 7px; }
.st-swatches { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.st-swatch { width: 18px; height: 18px; border-radius: 4px; border: 1px solid var(--hair-2); background: var(--sw); cursor: pointer; padding: 0; }
.st-swatch.on { outline: 2px solid var(--focus); outline-offset: 1px; }
.st-panel input[type="color"] { width: 44px; height: 26px; padding: 0 2px; border: 1px solid var(--hair-2); border-radius: var(--r-ctl); background: var(--sheet); }
.st-layer { display: flex; align-items: center; gap: 4px; padding: 4px 4px; border-top: 1px solid var(--hair); margin-top: 4px; font-size: 12px; }
.st-layer:first-child { border-top: 0; margin-top: 0; }
.st-layer-item { display: flex; align-items: center; gap: 4px; padding: 3px 4px; border-radius: var(--r-ctl); font-size: 12px; cursor: default; }
.st-layer-item:hover { background: var(--sheet-2); }
.st-layer-item.on { background: var(--info-bg); }
.st-layer-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-eye { border: 0; background: transparent; color: var(--text-2); width: 20px; height: 20px; padding: 0; display: grid; place-items: center; cursor: pointer; border-radius: 4px; }
.st-eye .ic { width: 14px; height: 14px; }
.st-eye.off { color: var(--text-3); opacity: .6; }
.st-status { grid-area: status; display: flex; align-items: center; gap: 16px; padding: 0 12px; font-size: 11px; color: var(--text-2); background: var(--chrome); border-top: 1px solid var(--hair); }
.st-status .cb { font-size: 11px; gap: 4px; }
.stu-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 14px; }
.stu-card { position: relative; background: var(--sheet); border: 1px solid var(--hair); border-radius: var(--r-sheet); box-shadow: var(--shadow-1); overflow: hidden; cursor: pointer; }
.stu-card:hover { box-shadow: var(--shadow-2); }
.stu-thumb { height: 140px; display: grid; place-items: center; background: var(--sheet-2); border-bottom: 1px solid var(--hair); color: var(--text-3); }
.stu-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.stu-card-body { padding: 10px 12px; display: grid; gap: 2px; }
.stu-card-body small { color: var(--text-2); }
.stu-card-menu { position: absolute; top: 8px; right: 8px; }
@media (max-width: 900px) { .studio { grid-template-columns: 40px 1fr; grid-template-areas: "top top" "tools canvas" "status status"; } .st-side { display: none; } }
.st-pf { margin: 6px 0 0; padding-left: 18px; font-size: 13px; display: grid; gap: 4px; }
.st-pf .pf-error { color: var(--danger); } .st-pf .pf-warn { color: var(--warn); } .st-pf .pf-info { color: var(--text-2); }
.hint.ok { color: var(--ok); }
.dlg h3, #modal h3 { font: 600 11px/1 var(--f-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); margin: 14px 0 6px; }
/* ---- brand kits */
.bk-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 14px; }
.bk-card { background: var(--sheet); border: 1px solid var(--hair); border-radius: var(--r-sheet); box-shadow: var(--shadow-1); cursor: pointer; overflow: hidden; }
.bk-card:hover { box-shadow: var(--shadow-2); }
.bk-swatch-strip { display: flex; height: 36px; background: var(--sheet-2); align-items: center; padding: 0 12px; gap: 6px; }
.bk-swatch-strip span { flex: 1; height: 20px; border-radius: 4px; background: var(--sw); border: 1px solid var(--hair-2); }
.bk-card-body { padding: 10px 12px 12px; display: grid; gap: 2px; }
.bk-card-body small { color: var(--text-2); }
.bk-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.bk-swatch { display: flex; gap: 10px; align-items: center; background: var(--sheet); border: 1px solid var(--hair); border-radius: var(--r-sheet); padding: 8px; }
.bk-chip { width: 48px; height: 48px; border-radius: 6px; background: var(--sw); border: 1px solid var(--hair-2); flex: none; }
.bk-swatch-info { display: grid; gap: 1px; font-size: 12px; min-width: 0; }
.bk-swatch-info small { color: var(--text-2); }
.linklike { background: none; border: 0; padding: 0; color: var(--focus); cursor: pointer; text-align: left; font: inherit; }
.bk-list { margin: 4px 0 0; padding-left: 20px; display: grid; gap: 4px; }
.bk-pre { font: 12px/1.5 ui-monospace, Menlo, monospace; background: var(--sheet-2); border: 1px solid var(--hair); border-radius: var(--r-ctl); padding: 10px 12px; white-space: pre-wrap; }
.bk-folder { margin-top: 10px; }
.bk-files { display: grid; gap: 6px; }
.bk-dir { border-left: 2px solid var(--hair); padding-left: 10px; margin: 4px 0; }
.bk-dir > summary { cursor: pointer; font-weight: 600; font-size: 13px; padding: 4px 0; }
.bk-file { display: flex; gap: 10px; align-items: center; background: var(--sheet); border: 1px solid var(--hair); border-radius: var(--r-ctl); padding: 6px 8px; }
.bk-thumb { width: 72px; height: 48px; display: grid; place-items: center; background: var(--sheet-2); border-radius: 4px; overflow: hidden; flex: none; background-image: linear-gradient(45deg, var(--hair) 25%, transparent 25%, transparent 75%, var(--hair) 75%), linear-gradient(45deg, var(--hair) 25%, transparent 25%, transparent 75%, var(--hair) 75%); background-size: 12px 12px; background-position: 0 0, 6px 6px; }
.bk-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.bk-thumb.bk-ext { font: 600 11px var(--f-ui); color: var(--text-2); background-image: none; }
.bk-file-body { flex: 1; min-width: 0; display: grid; }
.bk-file-body b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.st-trace-preview { margin-top: 8px; background: var(--sheet-2); border: 1px solid var(--hair); border-radius: var(--r-ctl); padding: 8px; min-height: 60px; display: grid; place-items: center; }
.st-trace-preview svg { max-width: 100%; }
.st-mock { margin-top: 10px; background: var(--sheet-2); border: 1px solid var(--hair); border-radius: var(--r-ctl); padding: 6px; }
.st-mock svg { display: block; max-height: 420px; width: 100%; height: auto; }
.st-grad { margin-top: 6px; display: grid; gap: 4px; }
.st-grad-bar div { height: 14px; border-radius: 4px; border: 1px solid var(--hair-2); background: var(--g); }
.st-stop input[type="number"] { width: 58px; }
.st-sym { display: flex; gap: 8px; align-items: center; padding: 6px; border: 1px solid var(--hair); border-radius: var(--r-ctl); margin-bottom: 6px; background: var(--sheet); }
.st-sym-thumb { width: 44px; height: 44px; flex: none; background: var(--sheet-2); border-radius: 4px; display: grid; place-items: center; }
.st-sym-thumb svg { width: 40px; height: 40px; }
.st-sym-body { flex: 1; min-width: 0; display: grid; font-size: 12px; }
.st-scene-cv { display: block; max-width: 100%; border: 1px solid var(--hair); border-radius: var(--r-ctl); cursor: crosshair; touch-action: none; }
/* ---- analytics */
.an-chartwrap { margin: 12px 0; padding: 12px; }
.an-chart { display: block; }
.an-key { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-2); margin-left: 10px; }
.an-key i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; } .an-key .k1 { background: var(--poseidon); } .an-key .k2 { background: var(--ink-300); } .an-key .k3 { background: var(--accent); border-radius: 50%; }
.an-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.an-grid .panel { padding: 12px; }
@media (max-width: 900px) { .an-grid { grid-template-columns: 1fr; } }
.an-site input { font-size: 12px; }
/* ---- projects */
.chip.st-active { background: var(--ok-bg); color: var(--ok); } .chip.st-scheduled, .chip.st-quoted { background: var(--info-bg); color: var(--info); } .chip.st-estimating { background: var(--warn-bg); color: var(--warn); } .chip.st-done, .chip.st-lost { color: var(--text-3); }
.proj-grid { align-items: start; } .proj-grid > div > .panel { margin-bottom: 12px; }
.proj-drop { display: flex; align-items: center; gap: 12px; padding: 14px; border: 2px dashed var(--hair-2); border-radius: var(--r-sheet); color: var(--text-2); margin: 10px 0; }
.proj-drop.on { border-color: var(--accent); background: var(--sheet-2); }
.proj-files { display: grid; gap: 6px; }
.proj-file { display: flex; gap: 10px; align-items: center; border: 1px solid var(--hair); border-radius: var(--r-ctl); padding: 6px 8px; background: var(--sheet); }
.proj-thumb { width: 56px; height: 44px; object-fit: cover; border-radius: 4px; background: var(--sheet-2); flex: none; }
.proj-thumb.ext { display: grid; place-items: center; color: var(--text-2); }
.proj-file-body { flex: 1; min-width: 0; display: grid; } .proj-file-body b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.proj-mail { max-height: 360px; overflow: auto; display: grid; gap: 4px; margin-top: 8px; }
.proj-mail-row { padding: 6px 8px; border: 1px solid var(--hair); border-radius: var(--r-ctl); cursor: pointer; } .proj-mail-row:hover { background: var(--sheet-2); }
.est-log { margin-top: 8px; max-height: 320px; overflow: auto; font-size: 13px; background: var(--sheet-2); border: 1px solid var(--hair); border-radius: var(--r-ctl); padding: 8px 10px; display: grid; gap: 4px; }
/* gantt */
.gantt { display: grid; grid-template-columns: 260px 1fr; border: 1px solid var(--hair); border-radius: var(--r-sheet); overflow: hidden; background: var(--sheet); }
.gantt-left { border-right: 1px solid var(--hair); background: var(--sheet-2); }
.gantt-right { overflow-x: auto; position: relative; }
.gantt-inner { position: relative; }
.gantt-head { height: 48px; border-bottom: 1px solid var(--hair); position: relative; }
.gantt-head.gl { display: grid; align-content: center; padding: 0 12px; font-size: 12px; }
.gantt-months { position: absolute; top: 0; height: 24px; left: 0; right: 0; } .gm { position: absolute; top: 0; height: 24px; line-height: 24px; padding-left: 6px; font: 600 12px var(--f-ui); border-left: 1px solid var(--hair); white-space: nowrap; overflow: hidden; }
.gantt-ticks { position: absolute; top: 24px; height: 24px; left: 0; right: 0; } .gt { position: absolute; top: 0; height: 24px; line-height: 24px; font-size: 10px; color: var(--text-2); border-left: 1px solid var(--hair); padding-left: 3px; white-space: nowrap; overflow: hidden; } .gt.we { background: var(--sheet-2); }
.gantt-today { position: absolute; top: 48px; bottom: 0; width: 2px; background: var(--accent); z-index: 2; }
.gantt-row { height: 36px; border-bottom: 1px solid var(--hair); position: relative; } .gantt-row.sub { height: 28px; }
.gantt-row.gl { display: grid; align-content: center; padding: 0 12px; font-size: 13px; cursor: pointer; } .gantt-row.gl b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .gantt-row.gl.sub { padding-left: 26px; font-size: 12px; } .gantt-row.gl .done { text-decoration: line-through; color: var(--text-3); }
.gnt-bar { position: absolute; top: 6px; height: 24px; border-radius: 6px; background: var(--c); color: var(--sheet); font-size: 12px; line-height: 24px; padding: 0 8px; white-space: nowrap; overflow: hidden; cursor: grab; user-select: none; box-shadow: var(--shadow-1); display: flex; align-items: center; }
.gantt-row.sub .gnt-bar { top: 4px; height: 20px; line-height: 20px; opacity: .85; border-radius: 5px; } .gnt-bar.done { opacity: .45; } .gnt-bar.ms { width: 20px !important; border-radius: 50%; padding: 0; }
.gnt-bar .gt-label { flex: 1; overflow: hidden; text-overflow: ellipsis; } .gnt-bar .gh { width: 8px; height: 100%; cursor: ew-resize; flex: none; }
/* calendar */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--hair); border: 1px solid var(--hair); border-radius: var(--r-sheet); overflow: hidden; }
.cal-dow { background: var(--sheet-2); padding: 6px 8px; font: 600 11px var(--f-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.cal-cell { background: var(--sheet); min-height: 92px; padding: 4px 6px; cursor: pointer; } .cal-cell.other { background: var(--sheet-2); color: var(--text-3); } .cal-cell.today .cal-day { background: var(--accent); color: var(--sheet); border-radius: 5px; }
.cal-day { font-size: 12px; font-weight: 600; width: 22px; text-align: center; margin-bottom: 3px; }
.cal-item { font-size: 11px; line-height: 16px; padding: 0 5px; border-radius: 4px; background: var(--c); color: var(--sheet); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .85; } .cal-item.proj { opacity: 1; font-weight: 600; } .cal-item.done { opacity: .4; }
/* user guides (dragged from the rulers) */
.st-userguides { pointer-events: none; }
.st-uguide { stroke: var(--info); stroke-width: 1; }
.st-uguide.temp { stroke-dasharray: 3 3; }
.st-ruler-top { cursor: row-resize; pointer-events: auto; } .st-ruler-left { cursor: col-resize; pointer-events: auto; }
/* live preview of a contour before it is made */
.st-preview { fill: none; stroke: var(--accent); stroke-width: 1.2; stroke-dasharray: 4 2; vector-effect: non-scaling-stroke; }
/* 9-point reference for X and Y (Affinity / CorelDRAW transform panel) */
.st-xyref { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: end; }
.st-ref { display: grid; grid-template-columns: repeat(3, 10px); gap: 3px; padding: 4px; border: 1px solid var(--hair); border-radius: 5px; margin-bottom: 4px; }
.st-refpt { width: 10px; height: 10px; padding: 0; border: 1px solid var(--text-3); border-radius: 2px; background: transparent; cursor: pointer; }
.st-refpt.on { background: var(--accent); border-color: var(--accent); }
.st-gap { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-2); }
.st-gap input { width: 64px; }
.st-guides { display: grid; gap: 6px; margin-bottom: 10px; } .st-guides input { width: 90px; }
