/* Editable mode in glass (Eddy 2026-11-21: "keep white color as main and allow dark mode", "keep it as close as you can to the revit
   structure", "i dont like blue color for top menu and need to have glass effect mac apple style overall", "6 preset colors ... to help
   users enjoy relax get focused happy"). Loaded last. The Revit structure of revit-workspace.css stays (ribbon tabs and panels, options
   line, Properties over Project Browser, view tabs, command line, view tools, status line); this file only gives it the glass, the six
   tones and the dark side. editable-glass.js keeps the choice (html[data-rv-tone], html[data-rv-dark]) and draws the two controls on the
   status line. Phones keep the plain look: everything here is for 701px and wider.
   Every selector starts with :root[data-rv-tone] body.v8-revit so it outranks revit-workspace.css and bar-layout.css. */
@media (min-width: 701px) {
  /* the six tones: an accent and three backdrop tints each, light then dark */
  :root[data-rv-tone] { --rg-a: #7a5a0c; --rg-w1: #eceef1; --rg-w2: #f6f1e7; --rg-w3: #e9ecef; }
  :root[data-rv-tone=focus] { --rg-a: #2f5d86; --rg-w1: #e3ebf3; --rg-w2: #eef3f8; --rg-w3: #dfe8f0; }
  :root[data-rv-tone=relax] { --rg-a: #3d6b4f; --rg-w1: #e2eee4; --rg-w2: #f0f5ec; --rg-w3: #dfeae0; }
  :root[data-rv-tone=happy] { --rg-a: #7d5600; --rg-w1: #fbefc6; --rg-w2: #fdf7e4; --rg-w3: #f8ecc8; }
  :root[data-rv-tone=warm] { --rg-a: #934526; --rg-w1: #f6e2d6; --rg-w2: #fbf0ea; --rg-w3: #f3ddd0; }
  :root[data-rv-tone=create] { --rg-a: #5f4a9c; --rg-w1: #e8e2f5; --rg-w2: #f3f0fa; --rg-w3: #e3dcf2; }
  :root[data-rv-tone][data-rv-dark] { --rg-a: #f3d58c; --rg-w1: #17181c; --rg-w2: #221f1a; --rg-w3: #15171b; }
  :root[data-rv-tone=focus][data-rv-dark] { --rg-a: #9cc4e8; --rg-w1: #111922; --rg-w2: #18222d; --rg-w3: #0f161e; }
  :root[data-rv-tone=relax][data-rv-dark] { --rg-a: #a8d5b5; --rg-w1: #111a14; --rg-w2: #18231b; --rg-w3: #0f1712; }
  :root[data-rv-tone=happy][data-rv-dark] { --rg-a: #ffd76a; --rg-w1: #1c180c; --rg-w2: #272011; --rg-w3: #19150a; }
  :root[data-rv-tone=warm][data-rv-dark] { --rg-a: #f0b196; --rg-w1: #1f1511; --rg-w2: #2a1c17; --rg-w3: #1b120f; }
  :root[data-rv-tone=create][data-rv-dark] { --rg-a: #c3b3f0; --rg-w1: #15121f; --rg-w2: #1e1a2b; --rg-w3: #13101b; }

  :root[data-rv-tone] body.v8-revit {
    --rv-text: #1d1d1f; --rg-mute: #6e6e73; --rg-pane: rgba(255, 255, 255, .6); --rg-solid: rgba(250, 250, 251, .95);
    --rg-edge: rgba(255, 255, 255, .95); --rg-line: rgba(0, 0, 0, .1); --rg-soft: rgba(0, 0, 0, .055); --rg-field: rgba(255, 255, 255, .85);
    --rg-canvas: #fff; --rg-chat: rgba(52, 52, 56, .74); --rg-on: #fff; --rg-shadow: 0 8px 24px rgba(0, 0, 0, .1);
    --rg-sel: color-mix(in srgb, var(--rg-a) 16%, transparent); --rg-blur: blur(26px) saturate(1.7);
    --rv-bg: var(--rg-solid); --rv-edge: rgba(0, 0, 0, .14);
    background: radial-gradient(640px 420px at 6% 0%, color-mix(in srgb, var(--rg-a) 20%, transparent), transparent 70%),
      radial-gradient(760px 520px at 100% 62%, color-mix(in srgb, var(--rg-a) 13%, transparent), transparent 70%),
      linear-gradient(135deg, var(--rg-w1), var(--rg-w2) 55%, var(--rg-w3)) fixed !important;
  }
  :root[data-rv-tone][data-rv-dark] body.v8-revit {
    --rv-text: #f5f5f7; --rg-mute: #a1a1a6; --rg-pane: rgba(255, 255, 255, .085); --rg-solid: rgba(36, 37, 41, .95);
    --rg-edge: rgba(255, 255, 255, .24); --rg-line: rgba(255, 255, 255, .12); --rg-soft: rgba(255, 255, 255, .08); --rg-field: rgba(255, 255, 255, .08);
    --rg-canvas: #141518; --rg-chat: rgba(255, 255, 255, .1); --rg-on: #1d1d1f; --rg-shadow: 0 8px 24px rgba(0, 0, 0, .45);
    --rv-edge: rgba(255, 255, 255, .18); color-scheme: dark;
  }

  /* the top bar: the same DAVINCI pill, clear glass here (no slate tint); the words take the page's ink */
  :root[data-rv-tone] body.v8-revit:not(.v8-looking, .v8-page-open) #workspace > header { background: var(--rg-pane) !important; border: 1px solid var(--rg-edge) !important; color: var(--rv-text) !important;
    -webkit-backdrop-filter: blur(30px) saturate(1.7) !important; backdrop-filter: blur(30px) saturate(1.7) !important; box-shadow: var(--rg-shadow) !important; }
  :root[data-rv-tone] body.v8-revit:not(.v8-looking, .v8-page-open) #workspace > header :is(button, strong, em, span, .bar-glyph) { color: var(--rv-text) !important; }
  :root[data-rv-tone] body.v8-revit:not(.v8-looking, .v8-page-open) #workspace > header .brand em,
  :root[data-rv-tone] body.v8-revit:not(.v8-looking, .v8-page-open) #workspace > header .v8-home-link em { color: var(--rg-a) !important; }
  :root[data-rv-tone] body.v8-revit:not(.v8-looking, .v8-page-open) #workspace > header .v8-bar-sep.sep { background: var(--rg-line); }
  :root[data-rv-tone] body.v8-revit:not(.v8-looking, .v8-page-open) #workspace > header .v8-bar-icon:hover { background: var(--rg-soft); }
  :root[data-rv-tone] body.v8-revit:not(.v8-looking, .v8-page-open) #workspace > header :is(#v8-davinci-mode, #v8-mode-toggle, #v8-look-open, #v8-play) { background: var(--rg-soft); }
  :root[data-rv-tone] body.v8-revit:not(.v8-looking, .v8-page-open) #workspace > header :is(#v8-davinci-mode, #v8-mode-toggle, #v8-look-open, #v8-play):hover { background: var(--rg-sel); }
  :root[data-rv-tone] body.v8-revit:not(.v8-looking, .v8-page-open) #workspace > header :is(#v8-davinci-mode, #v8-mode-toggle, #v8-look-open, #v8-play, [data-icon="page"]).on > svg.v8i { background: var(--rg-sel); color: var(--rg-a); }
  :root[data-rv-tone] body.v8-revit:not(.v8-looking, .v8-page-open) #workspace > header [data-bar-name^="Profile"] { border-color: var(--rv-text); }
  :root[data-rv-tone] body.v8-revit:not(.v8-looking, .v8-page-open) #workspace > header .v8-bar-icon > :is(b, .v8-report-badge) { color: #3b2a05 !important; }
  :root[data-rv-tone] body.v8-revit:not(.v8-looking, .v8-page-open) #workspace > header [data-tip]:is(:hover, :focus-visible)::after { background: rgba(44, 44, 48, .78); }
  :root[data-rv-tone] body.v8-revit:not(.v8-looking, .v8-page-open) #workspace > header .rv-small:disabled { opacity: .4; }

  /* the ribbon: one glass pane, 6px under the pill */
  :root[data-rv-tone] body.v8-revit .rv-ribbon { left: 8px; right: 8px; top: calc(31px + var(--rv-y, 0px)); box-sizing: border-box; overflow: hidden; background: var(--rg-pane);
    -webkit-backdrop-filter: var(--rg-blur); backdrop-filter: var(--rg-blur); border: 1px solid var(--rg-edge); border-radius: 14px; box-shadow: var(--rg-shadow); color: var(--rv-text); }
  :root[data-rv-tone] body.v8-revit .rv-tabs { border-bottom: 1px solid var(--rg-line); align-items: center; gap: 2px; padding-left: 6px; }
  :root[data-rv-tone] body.v8-revit .rv-tab { height: 22px; padding: 0 12px; border-radius: 999px; color: var(--rg-mute); }
  :root[data-rv-tone] body.v8-revit .rv-tab:hover { background: var(--rg-soft); }
  :root[data-rv-tone] body.v8-revit .rv-tab[aria-selected=true] { background: var(--rg-sel); color: var(--rg-a); box-shadow: none; }
  :root[data-rv-tone] body.v8-revit .rv-tab:first-child { background: var(--rg-a); color: var(--rg-on); }
  :root[data-rv-tone] body.v8-revit .rv-panels { background: transparent; scrollbar-width: none; }
  :root[data-rv-tone] body.v8-revit .rv-panel { border-right: 1px solid var(--rg-line); }
  :root[data-rv-tone] body.v8-revit .rv-tool { color: var(--rv-text); border-radius: 10px; }
  :root[data-rv-tone] body.v8-revit .rv-tool svg { color: var(--rg-a); }
  :root[data-rv-tone] body.v8-revit :is(.rv-tool, .rv-small):hover { background: var(--rg-sel); border-color: transparent; }
  :root[data-rv-tone] body.v8-revit .rv-panel-name { color: var(--rg-mute); }
  :root[data-rv-tone] body.v8-revit .rv-options { height: 23px; background: transparent; border-top: 1px solid var(--rg-line); color: var(--rg-mute); }
  :root[data-rv-tone] body.v8-revit .rv-tool-search { top: 4px; height: 21px; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--rv-edge); background: var(--rg-field); color: var(--rv-text); }

  /* Properties over Project Browser: two glass panes with a gap */
  :root[data-rv-tone] body.v8-revit :is(#v7-model-drawer, #v7-properties-drawer) { left: 8px !important; width: calc(var(--rv-left) - 14px) !important; border: 1px solid var(--rg-edge) !important;
    border-radius: 14px !important; background: var(--rg-pane) !important; -webkit-backdrop-filter: var(--rg-blur) !important; backdrop-filter: var(--rg-blur) !important; box-shadow: var(--rg-shadow) !important; }
  :root[data-rv-tone] body.v8-revit #v7-properties-drawer.inspector:not(.expanded) { width: calc(var(--rv-left) - 14px) !important; }
  :root[data-rv-tone] body.v8-revit #v7-properties-drawer { height: calc(var(--rv-props) - 6px) !important; }
  :root[data-rv-tone] body.v8-revit #v7-model-drawer { bottom: 38px !important; }
  :root[data-rv-tone] body.v8-revit .rv-palette-title { background: var(--rg-solid); border-block: 0; border-bottom: 1px solid var(--rg-line); }
  :root[data-rv-tone] body.v8-revit :is(#v7-model-drawer, #v7-properties-drawer) :is(input, select),
  :root[data-rv-tone] body.v8-revit #v7-properties-drawer #element-fields input { background: var(--rg-field) !important; border: 1px solid var(--rv-edge) !important; border-radius: 7px !important; color: var(--rv-text) !important; }
  :root[data-rv-tone] body.v8-revit #object-list button { border-radius: 7px !important; }
  :root[data-rv-tone] body.v8-revit #object-list button.selected { background: var(--rg-sel) !important; }
  :root[data-rv-tone] body.v8-revit #v7-properties-drawer .v8-composition { background: var(--rg-soft) !important; border: 1px solid var(--rg-line) !important; border-radius: 10px !important; }
  :root[data-rv-tone] body.v8-revit :is(.rv-width-splitter, .rv-height-splitter):is(:hover, :focus-visible) { background: var(--rg-a); border-radius: 3px; }

  /* the model: view tabs, the white sheet and the command line read as one pane */
  :root[data-rv-tone] body.v8-revit .rv-view-tabs { right: 8px; box-sizing: border-box; align-items: center; gap: 2px; padding: 0 6px; background: var(--rg-pane);
    -webkit-backdrop-filter: var(--rg-blur); backdrop-filter: var(--rg-blur); border: 1px solid var(--rg-edge); border-bottom: 1px solid var(--rg-line); border-radius: 14px 14px 0 0; }
  :root[data-rv-tone] body.v8-revit .rv-view-tab { border: 0; border-radius: 999px !important; padding: 3px 12px; color: var(--rg-mute); }
  :root[data-rv-tone] body.v8-revit .rv-view-tab.active { background: var(--rg-sel); color: var(--rg-a); }
  :root[data-rv-tone] body.v8-revit .layout { inset: var(--rv-top) 8px 38px var(--rv-left) !important; }   /* the status line only: the command line is in the ribbon, the view tools at the model's side */
  :root[data-rv-tone] body.v8-revit :is(.model-area, .canvas-wrap) { background: var(--rg-canvas) !important; }
  :root[data-rv-tone] body.v8-revit #cmd-box { right: 8px !important; bottom: 66px !important; background: var(--rg-pane); -webkit-backdrop-filter: var(--rg-blur); backdrop-filter: var(--rg-blur);
    border: 1px solid var(--rg-edge); border-top: 1px solid var(--rg-line); border-radius: 0 0 14px 14px; }
  :root[data-rv-tone] body.v8-revit #cmd-line { border-radius: 999px; padding: 4px 12px; background: var(--rg-field); color: var(--rv-text); border: 1px solid var(--rv-edge); }
  :root[data-rv-tone] body.v8-revit :is(.rv-execute, .rv-command-help) { border-radius: 999px; padding: 5px 12px; background: var(--rg-field); color: var(--rv-text); border: 1px solid var(--rv-edge); }
  :root[data-rv-tone] body.v8-revit #cmd-out:not([hidden]) { background: var(--rg-solid); color: var(--rv-text); border: 1px solid var(--rv-edge); border-radius: 12px; margin-bottom: 6px; }
  :root[data-rv-tone] body.v8-revit #cmd-out.error { color: #b3261e; }
  :root[data-rv-tone][data-rv-dark] body.v8-revit #cmd-out.error { color: #ff9a8f; }
  :root[data-rv-tone] body.v8-revit #edit-bar:not([hidden]) { right: 8px !important; background: var(--rg-solid) !important; border: 1px solid var(--rg-edge) !important; border-radius: 14px 14px 0 0 !important; color: var(--rv-text) !important; }
  :root[data-rv-tone] body.v8-revit #sketch-bar { right: 8px !important; background: var(--rg-solid) !important; border: 1px solid var(--rv-edge) !important; border-radius: 10px !important; color: var(--rv-text) !important; }
  :root[data-rv-tone] body.v8-revit #sketch-bar :is(button, span, strong) { color: var(--rv-text) !important; }
  /* the cube draws white faces: on the white sheet it needs a smoked pane behind it */
  :root[data-rv-tone] body.v8-revit #view-cube { background: rgba(110, 114, 122, .34) !important; border: 1px solid var(--rg-edge); border-radius: 12px !important; -webkit-backdrop-filter: var(--rg-blur); backdrop-filter: var(--rg-blur); box-shadow: none !important; }
  :root[data-rv-tone][data-rv-dark] body.v8-revit #view-cube { background: var(--rg-pane) !important; }
  :root[data-rv-tone] body.v8-revit :is(.rv-tool-search, .rv-browser-search, #cmd-line)::placeholder { color: var(--rg-mute); opacity: 1; }

  /* view tools and the status line: two glass pills under the model */
  :root[data-rv-tone] body.v8-revit #view-bar { bottom: 36px !important; right: 8px !important; height: 26px !important; box-sizing: border-box; padding: 0 10px !important; background: var(--rg-pane) !important;
    border: 1px solid var(--rg-edge) !important; border-radius: 999px !important; -webkit-backdrop-filter: var(--rg-blur); backdrop-filter: var(--rg-blur); }
  :root[data-rv-tone] body.v8-revit #view-bar button { height: 22px !important; color: var(--rg-mute) !important; }
  :root[data-rv-tone] body.v8-revit #view-bar svg { color: var(--rg-a) !important; }
  :root[data-rv-tone] body.v8-revit #view-bar .hv { border-radius: 999px !important; }
  :root[data-rv-tone] body.v8-revit #view-bar [aria-pressed=true] { background: var(--rg-sel) !important; }
  :root[data-rv-tone] body.v8-revit .rv-status { left: 8px; right: 8px; bottom: 6px; padding: 0 6px 0 14px; gap: 12px; background: var(--rg-pane); -webkit-backdrop-filter: var(--rg-blur); backdrop-filter: var(--rg-blur);
    border: 1px solid var(--rg-edge); border-radius: 999px; color: var(--rg-mute); }
  :root[data-rv-tone] body.v8-revit .rv-status > span:first-child { flex: 1 1 auto; min-width: 0; }

  /* the two controls on the status line: six tones and light or dark */
  .rg-look { display: none; }
  :root[data-rv-tone] body.v8-revit .rg-look { display: flex; align-items: center; gap: 5px; flex: none; }
  :root[data-rv-tone] body.v8-revit .rg-look button { position: relative; box-sizing: border-box; padding: 0; cursor: pointer; }
  :root[data-rv-tone] body.v8-revit .rg-tone { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--rv-edge); background: var(--c); }
  :root[data-rv-tone] body.v8-revit .rg-tone[aria-pressed=true] { box-shadow: 0 0 0 2px var(--rg-canvas), 0 0 0 3.5px var(--rg-a); }
  :root[data-rv-tone] body.v8-revit .rg-dark { width: 22px; height: 20px; margin-left: 6px; border: 0; border-radius: 999px; background: transparent; color: var(--rv-text); display: inline-flex; align-items: center; justify-content: center; }
  :root[data-rv-tone] body.v8-revit .rg-dark:hover { background: var(--rg-soft); }
  :root[data-rv-tone] body.v8-revit .rg-dark svg { width: 14px; height: 14px; }
  :root[data-rv-tone] body.v8-revit .rg-look [data-tip]:is(:hover, :focus-visible)::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 10px); right: -6px; z-index: 60; white-space: nowrap; pointer-events: none;
    font: 400 11px/1.2 Inter, system-ui, sans-serif; color: #fff; padding: 5px 10px; border-radius: 999px; background: rgba(44, 44, 48, .78); border: .5px solid rgba(255, 255, 255, .28);
    -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px); }

  /* the chat pill: the same pill, a neutral smoked glass so DAVINCI's words stay white (no slate) */
  :root[data-rv-tone] body.v8-revit:not(.v8-looking, .v8-page-open) #davinci-dock { bottom: 72px !important; }   /* the height it has in every view (v7-shell.css; was 121px above the command line, then 68px above the view tools' row) */
  /* The chat pill has the same shape as in DAVINCI mode (the pill to write in and the line under it, no card around them) and takes
     this page's glass and ink like the top pill (Eddy 2026-11-21: "also standardize davinci chat pill"; before: a dark card on a light
     page). Look, Play and the project page opened over Editable mode are scenes: there the top pill and the chat are the DAVINCI
     glass (bar-layout.css), which is why every rule of the bar and the chat here leaves them out. */
  :root[data-rv-tone] body.v8-revit:not(.v8-looking, .v8-page-open) #davinci-dock #agent-form,
  :root[data-rv-tone] body.v8-revit:not(.v8-looking, .v8-page-open) #v8-work-pill { background: var(--rg-pane) !important; border: 1px solid var(--rv-edge) !important;
    box-shadow: var(--rg-shadow) !important; color: var(--rv-text) !important; }   /* the darker hairline: it sits on the white model sheet */
  :root[data-rv-tone] body.v8-revit:not(.v8-looking, .v8-page-open) #davinci-dock #agent-form :is(textarea, button, .dv-gbtn, .dv-btn),
  :root[data-rv-tone] body.v8-revit:not(.v8-looking, .v8-page-open) #v8-work-pill :is(span, b, button) { color: var(--rv-text) !important; }
  :root[data-rv-tone] body.v8-revit:not(.v8-looking, .v8-page-open) #davinci-dock #agent-form textarea::placeholder { color: var(--rg-mute) !important; }
  :root[data-rv-tone] body.v8-revit:not(.v8-looking, .v8-page-open) #davinci-dock #agent-form textarea { caret-color: var(--rv-text); }
  :root[data-rv-tone] body.v8-revit:not(.v8-looking, .v8-page-open) #davinci-dock.open #agent-chat { background: transparent !important; }
  :root[data-rv-tone] body.v8-revit:not(.v8-looking, .v8-page-open) #davinci-dock .davinci-dock-fold { color: var(--rg-mute) !important; }

  /* what floats over the model sits 21px higher, with the taller foot */
  :root[data-rv-tone] body.v8-revit .v8-pj-panel { bottom: 117px; }
  :root[data-rv-tone] body.v8-revit :is(.v8-pj-panel, #v8-files-card, .v8-intake-row) {
    --dv-text: var(--rv-text);
    --dv-muted: var(--rg-mute);
    --dv-faint: var(--rg-mute);
    --dv-gold: var(--rg-a);
    background: var(--rg-solid) !important;
    color: var(--rv-text);
    border-color: var(--rv-edge);
  }
  :root[data-rv-tone] body.v8-revit :is(.v8-pj-panel, #v8-files-card) :is(button, input, select, textarea, .dv-btn) {
    color: var(--rv-text);
    background-color: var(--rg-field);
    border: 1px solid var(--rv-edge);
  }
  :root[data-rv-tone] body.v8-revit :is(.v8-pj-panel, #v8-files-card) :is(.dv-btn.primary, .v8-pj-tab.on) {
    background-color: var(--rg-a);
    color: var(--rg-on);
  }
  :root[data-rv-tone] body.v8-revit .v8-pj-panel :is(.v8-pj-note.bad, .v8-pj-note.gold, .v8-pj-page) { color: var(--rg-a); }
  :root[data-rv-tone] body.v8-revit .v8-intake-row :is(small, .v8-intake-pic) { color: var(--rv-text); }
  :root[data-rv-tone] body.v8-revit #element-sheet { right: 8px !important; bottom: 111px !important; background: var(--rg-canvas) !important; color: var(--rv-text) !important; border: 1px solid var(--rv-edge) !important; }
  :root[data-rv-tone] body.v8-revit #element-sheet > header { background: var(--rg-solid) !important; color: var(--rv-text) !important; border-bottom: 1px solid var(--rv-edge) !important; }
  :root[data-rv-tone] body.v8-revit #element-sheet > header :is(strong, span, label, button, input) { color: var(--rv-text) !important; }
  :root[data-rv-tone] body.v8-revit #element-sheet > header button { background: var(--rg-field) !important; border: 1px solid var(--rv-edge) !important; border-radius: 999px !important; }
  :root[data-rv-tone] body.v8-revit .v8-plan-readout { bottom: 113px !important; color: var(--rv-text) !important; background: var(--rg-solid) !important; }
  :root[data-rv-tone] body.v8-revit .v8-plan-typed { bottom: 143px !important; color: var(--rv-text) !important; background: var(--rg-solid) !important; border-radius: 10px !important; }

  /* Simulation in this mode: its boxes are glass panes in the page's ink, docked inside the model's pane (construction-tools.js) */
  :root[data-rv-tone] body.v8-revit :is(#sim, #sim-board, #sim-tl, #sim-prices, #sim-site) { --dv-text: var(--rv-text); --dv-muted: var(--rg-mute); --dv-soft: var(--rg-mute); --dv-gold: var(--rg-a); --dv-hover: var(--rg-sel);
    background: var(--rg-solid) !important; border: 1px solid var(--rv-edge) !important; -webkit-backdrop-filter: var(--rg-blur); backdrop-filter: var(--rg-blur); box-shadow: var(--rg-shadow) !important; color: var(--rv-text); }
  :root[data-rv-tone] body.v8-revit :is(#sim, #sim-board, #sim-tl, #sim-prices, #sim-site) :is(button, select, input, textarea) { color: var(--rv-text); background-color: var(--rg-soft); border-color: var(--rg-line); }
  :root[data-rv-tone] body.v8-revit :is(#sim, #sim-board, #sim-tl) button.on { background: var(--rg-a); color: var(--rg-on); }
  :root[data-rv-tone] body.v8-revit #sim-board .ring .trk { stroke: var(--rg-line); }
  :root[data-rv-tone] body.v8-revit #sim-board .ring .arc { stroke: var(--rg-a); }
  :root[data-rv-tone] body.v8-revit #sim-board .qr i { background: var(--rg-line); }
  :root[data-rv-tone] body.v8-revit #sim-board .qr u { background: var(--rg-a); }
  :root[data-rv-tone] body.v8-revit #sim-chat-handle { left: calc(var(--rv-left) + (100vw - var(--rv-left)) / 2); bottom: 119px; background: var(--rg-solid); color: var(--rv-text); border: 1px solid var(--rv-edge); }
  /* the cube steps aside while the progress box holds the right edge */
  :root[data-rv-tone] body.v8-revit:has(#sim-board:not([hidden]):not(.tab)) #view-cube { right: 292px !important; }
  :root[data-rv-tone] body.v8-revit:has(#sim-board:not([hidden]):not(.tab)) .v8-site-dots { right: 416px !important; }

  /* the dark side for the tool panels that were written for the light page (their own files give them white fields and grey words) */
  :root[data-rv-tone][data-rv-dark] body.v8-revit :is(.v8-topo-panel, .v8-pxyz, .v8-recipe-panel, .v8-view-panel, .v8-sys-panel, .v8-mep-panel, .v8-arch-panel, .v8-comp-props, .v8-comp-editor, .v8-dynamo, .v8-sheet-editor, .v8-cam-panel, .v8-pj-panel)
    :is(span, em, label, small, summary, th, td, p, b, strong, output, li, .t-facts, .t-hint, .t-row, .t-said, .dv-title, .dy-said, .dy-alias, .dy-run, .dy-check, .dy-lab, .dy-empty, .dy-start, .rc-mini) { color: var(--rv-text) !important; }
  :root[data-rv-tone][data-rv-dark] body.v8-revit :is(.v8-topo-panel, .v8-pxyz, .v8-recipe-panel, .v8-view-panel, .v8-sys-panel, .v8-mep-panel, .v8-arch-panel, .v8-comp-props, .v8-comp-editor, .v8-dynamo, .v8-sheet-editor)
    :is(.dv-field, .dv-btn, .dv-chip, .dv-x, .dy-f, .dy-name, .dy-watch, .dy-item, .dy-mini, .rc-card, .rc-shape, .rc-drop, .c-view, input, select, textarea) { background: var(--rg-field) !important; color: var(--rv-text) !important; border-color: var(--rv-edge) !important; }
  :root[data-rv-tone][data-rv-dark] body.v8-revit .v8-dynamo :is(.dy-node header, .dy-bubble) { background: rgba(255, 255, 255, .1) !important; color: var(--rv-text) !important; }
  :root[data-rv-tone][data-rv-dark] body.v8-revit :is(.t-said.s-bad, .rc-said.s-bad, .c-info.s-bad, .dy-said.s-bad) { color: #ff9a8f !important; }
  /* the chosen row and the main button of a tool panel take the tone, light or dark (a fixed blue before; in dark the chosen row was pale with pale words) */
  :root[data-rv-tone] body.v8-revit :is(.v8-view-panel .v-row.on, .v8-comp-editor .c-part.on) { background: var(--rg-sel) !important; border-color: var(--rg-a) !important; }
  :root[data-rv-tone] body.v8-revit :is(.v8-topo-panel, .v8-pxyz, .v8-recipe-panel, .v8-view-panel, .v8-sys-panel, .v8-mep-panel, .v8-arch-panel, .v8-comp-props, .v8-comp-editor, .v8-dynamo, .v8-sheet-editor)
    :is(.dv-btn.primary, .dv-chip.on) { background: var(--rg-a) !important; border-color: var(--rg-a) !important; color: var(--rg-on) !important; }

  /* The page strip (Eddy 2026-11-21, "Yes, build it"): the ribbon's row of tabs is this page's strip under the top pill, the pill's
     width and this page's glass, with Find a tool at its end. The ribbon's panels and options line follow under it as their own pane.
     The command line leaves the foot of the model for the options line, so the chat pill comes down to the window's centre on the view
     tools' row. Everything under the ribbon reads --rv-y (65px: 33px more than before, for the strip). */
  :root[data-rv-tone] body.v8-revit { --rv-y: 65px; }
  :root[data-rv-tone] body.v8-revit .rv-ribbon { overflow: visible; height: auto; background: transparent; border: 0; box-shadow: none;
    -webkit-backdrop-filter: none; backdrop-filter: none; pointer-events: none; }   /* a frame for its parts: clicks between them reach the page */
  :root[data-rv-tone] body.v8-revit .rv-ribbon > * { pointer-events: auto; }
  /* One capsule, one tool panel (Eddy 2026-11-22: "the three pills need to feel part of the same page ... create an empty main pill
     behind them to capsule them in one", the tabs "embedded to the tools and function pill under it", apart from the DAVINCI pill).
     The tabs are the tool panel's head, the panel's width, joined to the tools under them by a line; the options line and the
     command line are its foot. The DAVINCI pill above is untouched. The capsule is an empty glass behind the pill and the panel,
     drawn from the model's layout so the command line (which lives there) stays above it. */
  :root[data-rv-tone] body.v8-revit .rv-tabs { position: absolute; left: 0; right: 0; top: -18px; z-index: 2;
    height: 44px; box-sizing: border-box; padding: 0 190px 0 14px; scrollbar-width: none;
    background: var(--rg-pane); border: 1px solid var(--rg-edge); border-bottom: 1px solid var(--rg-line); border-radius: 16px 16px 0 0;
    -webkit-backdrop-filter: var(--rg-blur); backdrop-filter: var(--rg-blur); }
  :root[data-rv-tone] body.v8-revit .rv-tool-search { top: -14px; right: 14px; z-index: 3; }
  :root[data-rv-tone] body.v8-revit .rv-panels { margin-top: 26px; background: var(--rg-pane); border: 1px solid var(--rg-edge); border-top: 0; border-bottom: 0;
    border-radius: 0; -webkit-backdrop-filter: var(--rg-blur); backdrop-filter: var(--rg-blur); }
  :root[data-rv-tone] body.v8-revit .rv-options { height: 30px; padding: 8px 12px; background: var(--rg-pane); border: 1px solid var(--rg-edge);
    border-top: 1px solid var(--rg-line); border-right: 0; border-radius: 0 0 0 16px; -webkit-backdrop-filter: var(--rg-blur); backdrop-filter: var(--rg-blur);
    margin-right: var(--rv-cmd-w); }
  :root[data-rv-tone] body.v8-revit:not(.v8-looking, .v8-page-open) .layout::before { content: ""; position: absolute; z-index: 0; pointer-events: none;
    top: calc(4px - var(--rv-top)); left: calc(2px - var(--rv-left)); width: calc(100vw - 4px); height: calc(141px + var(--rv-y) + 30px + 6px - 4px);
    box-sizing: border-box; border-radius: 26px; background: var(--rg-soft); border: 1px solid var(--rg-edge); box-shadow: var(--rg-shadow);
    -webkit-backdrop-filter: var(--rg-blur); backdrop-filter: var(--rg-blur); }
  /* The command line is the options line's right end. It stays where the page's script made it (inside the model's layout, which is
     under the ribbon in the stacking order whatever its z-index), so the options line stops short and this box completes it. */
  :root[data-rv-tone] body.v8-revit { --rv-cmd-w: min(540px, 44vw); }
  :root[data-rv-tone] body.v8-revit #cmd-box { top: calc(141px + var(--rv-y)) !important; bottom: auto !important; left: auto !important; right: 8px !important;
    width: var(--rv-cmd-w) !important; min-height: 0 !important; height: 30px; box-sizing: border-box; padding: 2px 8px !important;
    background: var(--rg-pane) !important; border: 1px solid var(--rg-edge) !important; border-left: 0 !important; border-top: 1px solid var(--rg-line) !important;
    border-radius: 0 0 16px 0 !important; box-shadow: none !important; -webkit-backdrop-filter: var(--rg-blur) !important; backdrop-filter: var(--rg-blur) !important; }
  :root[data-rv-tone] body.v8-revit #cmd-line { height: 24px; padding: 2px 12px; font-size: 11.5px; }
  :root[data-rv-tone] body.v8-revit :is(.rv-execute, .rv-command-help) { padding: 3px 10px; font-size: 11px; }
  :root[data-rv-tone] body.v8-revit #cmd-out:not([hidden]) { top: 100%; bottom: auto; margin: 6px 0 0; }
  :root[data-rv-tone] body.v8-revit #element-sheet { bottom: 38px !important; }
  :root[data-rv-tone] body.v8-revit #sim-chat-handle { left: max(50%, calc(var(--rv-left) + 60px + min(560px, 100vw - var(--rv-left) - 76px) / 2)); bottom: 72px; }
  /* The view tools stand at the model's left edge (Eddy 2026-11-21, "Yes, move them": so the chat pill has the height it has in every
     view; before: a row under the model with the chat 24px higher above it). The same rail as in DAVINCI mode, in this page's glass;
     a tool's name and the cut's slider open to its right. */
  :root[data-rv-tone] body.v8-revit #view-bar { top: calc(var(--rv-top) + 40px) !important; bottom: auto !important; left: calc(var(--rv-left) + 10px) !important; right: auto !important;
    width: auto !important; height: auto !important; flex-direction: column !important; justify-content: flex-start !important; align-items: center; gap: 3px !important;
    padding: 5px !important; box-shadow: var(--rg-shadow) !important; }
  :root[data-rv-tone] body.v8-revit #view-bar > button { width: 26px !important; height: 26px !important; }
  :root[data-rv-tone] body.v8-revit #view-bar .vb-sep { width: 14px !important; height: 1px !important; margin: 2px 0 !important; background: var(--rg-line) !important; }
  :root[data-rv-tone] body.v8-revit #view-bar > button::before { right: auto; left: calc(100% + 10px); background: var(--rg-solid); color: var(--rv-text); border: 1px solid var(--rv-edge); }
  :root[data-rv-tone] body.v8-revit #view-bar .vb-cut { right: auto; left: calc(100% + 8px); background: var(--rg-solid); color: var(--rv-text); border: 1px solid var(--rv-edge); }
  @media (max-height: 760px) {   /* a short window: smaller symbols, so the rail ends above the status line */
    :root[data-rv-tone] body.v8-revit #view-bar { gap: 1px !important; padding: 4px !important; }
    :root[data-rv-tone] body.v8-revit #view-bar > button { width: 22px !important; height: 22px !important; }
    :root[data-rv-tone] body.v8-revit #view-bar .vb-sep { margin: 1px 0 !important; }
  }
}

/* Compact editing chrome. Retain the current DAVINCI glass and tone tokens. */
:root[data-rv-tone] body.v8-revit { --rv-y: 0px; --rv-top: 202px; --rv-left: 232px; }
:root[data-rv-tone] body.v8-revit #workspace > header { top: 6px !important; height: 40px !important; min-height: 0 !important; padding: 0 14px !important; }
:root[data-rv-tone] body.v8-revit .rv-ribbon { top: 54px; }
:root[data-rv-tone] body.v8-revit .rv-tabs { top: 0; height: 32px; padding-right: 180px; }
:root[data-rv-tone] body.v8-revit .rv-tab { padding: 3px 10px; font-size: 12px; }
:root[data-rv-tone] body.v8-revit .rv-tool-search { top: 4px; height: 24px; }
:root[data-rv-tone] body.v8-revit .rv-panels { margin-top: 32px; height: 60px; }
:root[data-rv-tone] body.v8-revit .rv-tool { min-width: 46px; max-width: 86px; gap: 2px; padding: 3px 5px; font-size: 10px; }
:root[data-rv-tone] body.v8-revit .rv-tool svg { width: 20px; height: 20px; }
:root[data-rv-tone] body.v8-revit .rv-panel-name { font-size: 9px; padding: 1px; }
:root[data-rv-tone] body.v8-revit .rv-options { height: 24px; padding: 4px 10px; }
:root[data-rv-tone] body.v8-revit #cmd-box { top: 146px !important; height: 24px !important; }
:root[data-rv-tone] body.v8-revit .rv-view-tabs { top: 174px; height: 28px; }
:root[data-rv-tone] body.v8-revit .layout::before { display: none; }
:root[data-rv-tone] body.v8-revit #v7-properties-drawer { top: var(--rv-top) !important; height: var(--rv-props) !important; }
:root[data-rv-tone] body.v8-revit #v7-model-drawer { top: calc(var(--rv-top) + var(--rv-props)) !important; }
.rv-space-controls { display: none; }
body.v8-revit .rv-space-controls { display: flex; position: fixed; right: 12px; bottom: 6px; z-index: 60; gap: 4px; }
body.v8-revit .rv-space-controls button { border: 1px solid var(--rg-edge); border-radius: 12px; padding: 3px 9px; background: var(--rg-pane); color: var(--rv-text); font: 11px var(--dv-font); cursor: pointer; }
body.v8-revit .rv-space-controls button[aria-pressed=true] { background: var(--rg-sel); border-color: var(--rg-a); }
:root[data-rv-tone] body.v8-revit.rv-ribbon-collapsed { --rv-top: 114px; }
:root[data-rv-tone] body.v8-revit.rv-ribbon-collapsed :is(.rv-panels,.rv-options,#cmd-box) { display: none !important; }
:root[data-rv-tone] body.v8-revit.rv-ribbon-collapsed .rv-view-tabs { top: 86px; }
:root[data-rv-tone] body.v8-revit.rv-ribbon-collapsed #v7-properties-drawer { top: 114px !important; }
:root[data-rv-tone] body.v8-revit.rv-ribbon-collapsed #v7-model-drawer { top: calc(var(--rv-top) + var(--rv-props)) !important; }
:root[data-rv-tone] body.v8-revit.rv-palettes-hidden { --rv-left: 8px !important; }
:root[data-rv-tone] body.v8-revit.rv-palettes-hidden :is(#v7-model-drawer,#v7-properties-drawer,.rv-width-splitter,.rv-height-splitter) { display: none !important; }
:root[data-rv-tone] body.v8-revit.rv-focus { --rv-top: 8px; --rv-left: 8px !important; }
:root[data-rv-tone] body.v8-revit.rv-focus :is(#workspace > header,.rv-ribbon,.rv-view-tabs,#cmd-box,#v7-model-drawer,#v7-properties-drawer,.rv-width-splitter,.rv-height-splitter,.rv-status,.davinci-dock,#sim-chat-handle) { display: none !important; }
:root[data-rv-tone] body.v8-revit.rv-focus .rv-space-controls button:not(:last-child) { display: none; }
@media(max-width:700px) { :root[data-rv-tone] body.v8-revit { --rv-left: 180px; } }

:root[data-rv-tone] body.v8-revit .rv-height-splitter { top: calc(var(--rv-top) + var(--rv-props) - 3px); }
/* Chat floats over the canvas instead of reserving a large empty strip. */
:root[data-rv-tone] body.v8-revit.davinci-dock-open:not(.v8-looking,.v8-page-open) .layout { bottom: 38px !important; }
body.v8-revit .rv-space-controls { right: auto; left: 50%; transform: translateX(-50%); white-space: nowrap; }
:root[data-rv-tone] body.v8-revit .rv-status > :first-child { max-width: calc(50vw - 190px); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* Keep the fitted canvas above the conversation; hiding it gives that space back. */
:root[data-rv-tone] body.v8-revit:not(.v8-looking,.v8-page-open) .layout,
:root[data-rv-tone] body.v8-revit.davinci-dock-open:not(.v8-looking,.v8-page-open) .layout { bottom: var(--rv-chat-space,38px) !important; }
:root[data-rv-tone] body.v8-revit.rv-chat-hidden :is(#davinci-dock,#v8-work-pill,#sim-chat-handle) { display:none !important; }
:root[data-rv-tone] body.v8-revit.rv-focus .layout { bottom:38px !important; }

.v8-levels-dialog {
  width: min(460px, calc(100vw - 32px));
  max-height: min(85dvh, 620px);
  padding: 20px;
  background: var(--rg-solid, #242529) !important;
  color: var(--rv-text, var(--dv-text));
}
.v8-levels-dialog::backdrop { background: rgba(0, 0, 0, .3); }
.v8-levels-dialog h2 { margin: 0 0 12px; font-size: 18px; }
.v8-levels-list > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 5px 0; }
.v8-levels-dialog form { display: grid; gap: 8px; margin-top: 12px; }
.v8-levels-dialog label { display: grid; gap: 4px; }
.v8-levels-dialog :is(.dv-field, .dv-btn:not(.primary)) { color: inherit; background: var(--rg-field, var(--dv-field)); border: 1px solid var(--rv-edge, var(--dv-edge)); }
.v8-levels-status { min-height: 1em; }

:root[data-rv-tone] body.v8-revit .v8-elmenu.dv-menu {
  background: var(--rg-solid, var(--dv-pane)) !important;
  color: var(--rv-text, var(--dv-text));
  border-color: var(--rv-edge, var(--dv-edge)) !important;
}
:root[data-rv-tone] body.v8-revit .v8-elmenu.dv-menu :is(button, .dv-title, .v8-elmenu-head small, button.danger span) { color: inherit; }
:root[data-rv-tone] body.v8-revit .v8-elmenu.dv-menu button .gx { color: var(--rg-a, var(--dv-gold)); }
:root[data-rv-tone] body.v8-revit .v8-elmenu.dv-menu button:is(:hover, :focus-visible) { background: var(--rg-sel, var(--dv-hover)); }
