/* revisions.css — Nov 18 2026 pass. Loaded last. One instrument across Writer, Table Read and Breakdown. */

/* ---- Scene strip under the Writer / Table Read "Scenes" header ----
   Same object as the Breakdown strip: a segment per scene, width = length on the page, scene colour as tint. */
body.studio-refined #sidebar .writerDetails>summary.has-es-strip{position:relative;overflow:hidden;}
body.studio-refined #sidebar .writerDetails>summary .es-strip{position:absolute;left:12px;right:12px;bottom:2px;display:flex;align-items:flex-end;gap:2px;height:10px;margin:0;padding:0;pointer-events:auto;cursor:default;}
body.studio-refined #sidebar .writerDetails>summary .es-strip:is(:empty,[hidden]){display:none;}
body.studio-refined #sidebar .writerDetails>summary .es-strip>i{flex:1 1 0;min-width:2px;height:2px;border-radius:1px;background:color-mix(in srgb,var(--line) 85%,transparent);cursor:pointer;transition:height 120ms ease,background 200ms ease,opacity 200ms ease;}
body.studio-refined #sidebar .writerDetails>summary .es-strip.is-dense{gap:1px;}
body.studio-refined #sidebar .writerDetails>summary .es-strip.is-dense>i{min-width:1px;}
body.studio-refined #sidebar .writerDetails>summary .es-strip>i.is-tinted{background:var(--seg);}
body.studio-refined #sidebar .writerDetails>summary .es-strip>i.is-open{height:4px;box-shadow:0 0 0 1px color-mix(in srgb,var(--text) 35%,transparent);}
body.studio-refined #sidebar .writerDetails>summary .es-strip>i.is-open.is-plain{background:color-mix(in srgb,var(--text) 55%,var(--line));}
body.studio-refined #sidebar .writerDetails>summary .es-strip>i.is-filtered{opacity:.22;}
body.studio-refined #sidebar .writerDetails>summary .es-strip>i:hover{height:5px;filter:brightness(1.25);}

/* ---- Writer search: the same quiet field as the Breakdown docks ---- */
body.studio-refined #sidebar .writerSceneSearch{display:flex;align-items:center;grid-template-columns:none;gap:0;}
body.studio-refined #sidebar .writerSceneSearch::before{content:'';position:absolute;left:9px;top:50%;width:13px;height:13px;translate:0 -50%;background:currentColor;color:var(--dim);pointer-events:none;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round'%3E%3Ccircle cx='9' cy='9' r='5.5'/%3E%3Cpath d='m13.2 13.2 3.3 3.3'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round'%3E%3Ccircle cx='9' cy='9' r='5.5'/%3E%3Cpath d='m13.2 13.2 3.3 3.3'/%3E%3C/svg%3E") center/contain no-repeat;transition:color 140ms ease;}
body.studio-refined #sidebar .writerSceneSearch:focus-within::before{color:var(--text);}
body.studio-refined #sidebar #writerDrawer .writerSceneSearch>input#writerSceneSearch{flex:1;padding-left:28px;padding-right:30px;border-color:transparent;background:var(--surface-1,var(--surface-0));font:500 11px/18px var(--sans);text-align:left;}
body.studio-refined #sidebar .writerSceneSearch>input::placeholder{text-align:left;}
body.studio-refined #sidebar .writerSceneSearch>input:hover{border-color:var(--line-soft);}
body.studio-refined #sidebar .writerSceneSearch>input:focus{border-color:var(--icon-mint);outline:none;}
body.studio-refined #sidebar .writerSceneSearch>input::-webkit-search-cancel-button,body.studio-refined #sidebar .writerSceneSearch>input::-webkit-search-decoration{appearance:none;display:none;}
body.studio-refined #sidebar .writerSceneSearch>#writerSearchReplaceToggle{position:absolute;right:3px;top:50%;translate:0 -50%;width:22px;height:22px;min-height:0;padding:0;border:0;border-radius:4px;background:none;color:var(--dim);}
body.studio-refined #sidebar .writerSceneSearch>#writerSearchReplaceToggle:hover{background:var(--surface-3);color:var(--text);}
body.studio-refined #sidebar .writerSceneSearch>#writerSearchReplaceToggle[aria-expanded=true]{color:var(--icon-mint);}

/* ---- Optical centering, site-wide ----
   The Breakdown fix (breakdown-pass.css) generalised: tableread.css's `#insights button{line-height:1}` beats the
   11px/18px line boxes the controls were designed with, and `--writer-label-offset:-1px` nudges labels up again.
   Measured against Windows (Segoe UI) metrics that left text ~2px high. Line boxes back, offset 0. */
body.studio-refined{--writer-label-offset:0px;}
body.production-mode #insights :is(.bd2-button,.bd2-item-head,.bd2-category-toggle,.bd2-cast-row,.bd2-suggest-name){line-height:18px;}

/* ---- Breakdown: the scene turns like a page in Table Read ---- */
#bd2Script{position:relative;}
.bd2-turning{perspective:2600px;position:relative;}
.bd2-turning .bd2-leaf{position:absolute;z-index:6;transform-origin:0 50%;transform-style:preserve-3d;pointer-events:none;overflow:hidden;will-change:transform;backface-visibility:hidden;border-radius:inherit;box-shadow:0 12px 40px #0008;}
.bd2-turning .bd2-leaf .bd2-leaf-face{pointer-events:none;}
.bd2-turning .bd2-leaf .bd2-leaf-face mark,.bd2-turning .bd2-leaf .bd2-leaf-face .bd2-suggest{pointer-events:none;}
.bd2-turning .bd2-leaf .bd2-leaf-back{position:absolute;inset:0;background:#ece8dd;transform:rotateY(180deg);backface-visibility:hidden;}

/* ---- Table Read export: Export · Scene · Format on one row ---- */
body.studio-refined #readExportDialog .readExportFields{grid-template-columns:112px minmax(0,1fr) 96px;}
body.studio-refined #readExportDialog .readExportFields:has([hidden]){grid-template-columns:112px 96px;}

/* ---- Table Read: running time per scene ---- */
body.studio-refined #sidebar .writerSceneNavTarget > span > .es-runtime{display:block;margin-top:1px;color:var(--dim);font:500 10px/14px var(--sans);font-variant-numeric:tabular-nums;letter-spacing:.02em;}

/* ---- Home ----
   Say what can be imported. The page keeps its original order and balance. */
body.studio-refined #empty .homeImportFormats{display:block;margin-top:10px;color:var(--dim);font:400 11px/16px var(--sans);opacity:.8;}

/* ---- Breakdown header: previous / next scene on either side of the title ---- */
.bd2-toolbar-title .bd2-title-text{display:flex;align-items:center;justify-content:center;gap:var(--writer-content-gap);flex:none;width:clamp(220px,24vw,460px);min-width:0;}
.bd2-toolbar-title .bd2-title-text>span{flex:none;}
body.studio-refined .bd2-toolbar-title .bd2-step{flex:none;margin:0 8px;}
body.studio-refined .bd2-toolbar-title .bd2-step svg{rotate:none;transform:none;}
body.studio-refined .bd2-toolbar-title .bd2-step-prev svg{transform:scaleX(-1);}
body.studio-refined .bd2-toolbar-title .bd2-step:disabled{opacity:.3;}

/* The open workspace carries one dot in its own colour, like the save light. */
body.studio-refined #brand #workspaceDock :is(#writerBtn,#brandHome,#toolsBtn)[aria-pressed="true"]::after{content:''!important;position:absolute!important;display:block!important;z-index:2;top:50%!important;bottom:auto!important;left:7px!important;right:auto!important;width:6px!important;height:6px!important;border:0!important;border-radius:50%!important;background:var(--workspace-tone)!important;box-shadow:0 0 8px color-mix(in srgb,var(--workspace-tone) 55%,transparent)!important;transform:translateY(-50%)!important;}

/* Writer and Table Read: the open Scenes header gets the same room under its strip as Production's,
   and eases open the same way — height and padding move together so the title never shifts. */
body.studio-refined #sidebar .writerDetails>summary.has-es-strip:has(.es-strip:not(:empty,[hidden])){box-sizing:border-box;height:44px!important;min-height:44px!important;padding-bottom:0!important;transition:height 180ms ease,padding-bottom 180ms ease;}
body.studio-refined #sidebar .writerDetails[open]>summary.has-es-strip:has(.es-strip:not(:empty,[hidden])){height:56px!important;padding-bottom:12px!important;}
body.studio-refined #sidebar .writerDetails>summary.has-es-strip .es-strip:not(:empty,[hidden]){top:28px;bottom:auto;transform:translateY(0);transition:transform 180ms ease;}
body.studio-refined #sidebar .writerDetails[open]>summary.has-es-strip .es-strip:not(:empty,[hidden]){transform:translateY(4px);}
@media (prefers-reduced-motion:reduce){body.studio-refined #sidebar .writerDetails>summary.has-es-strip,body.studio-refined #sidebar .writerDetails>summary.has-es-strip .es-strip{transition:none!important;}}
