/*
 * titleblocks BF5E Client Viewer migration layer.
 *
 * This file maps the separate static runtime to the accepted BF1 Light/Cool,
 * Compact semantic contract. Project, artwork, marker, and material colors
 * remain release data and are intentionally not remapped here.
 */

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("brand-foundation/v1/fonts/SpaceGrotesk-latin-wght-300-700.woff2") format("woff2");
}

@font-face {
  font-family: "Space Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("brand-foundation/v1/fonts/SpaceMono-latin-400.woff2") format("woff2");
}

@font-face {
  font-family: "Space Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("brand-foundation/v1/fonts/SpaceMono-latin-700.woff2") format("woff2");
}

:root,
[data-tb-theme="light-cool"] {
  --bg: var(--tb-color-canvas);
  --ink: var(--tb-color-text-primary);
  --ink2: var(--tb-color-text-secondary);
  --ink3: var(--tb-color-text-muted);
  --line: var(--tb-color-border-subtle);
  --line2: var(--tb-color-border-default);
  --stage: var(--tb-color-surface-sunken);
  --dark: var(--tb-color-text-primary);
  --accent: var(--tb-color-accent);
  --accent-deep: var(--tb-color-accent-hover);
  --ok: var(--tb-color-success-fg);
  --r: var(--tb-radius-control);
  --dot: var(--tb-color-border-subtle);
  --head: var(--tb-color-surface-raised);
  --mono: var(--tb-font-family-mono);
  --disp: var(--tb-font-family-body);
  --font: var(--tb-font-family-body);
  --pad: var(--tb-space-5);
}

html {
  min-width: 20rem;
  overflow: hidden;
  background: var(--tb-color-canvas);
}

.tb-theme-pending .app > header,
.tb-theme-pending .app > footer,
.tb-theme-pending #viewerMain > :not(.bootStatus) {
  visibility: hidden;
}

[data-tb-authoring-mode] .themeControl {
  display: none;
}

body {
  font-family: var(--tb-font-family-body);
  color: var(--tb-color-text-primary);
  background: var(--tb-color-canvas);
}

.deliverable-url,
.print-3d-note,
.batch-print {
  display: none;
}

.printAction {
  min-height: var(--tb-density-control-height);
  border: var(--tb-border-boundary);
  border-radius: var(--tb-button-radius);
  background: var(--tb-color-surface);
  color: var(--tb-color-text-primary);
  font-size: var(--tb-button-font-size);
  padding-inline: var(--tb-space-4);
}

.printAction:hover,
.printAction:focus-visible {
  border-color: var(--tb-color-accent);
  background: var(--tb-color-interaction-hover);
}

.print-dialog { width: min(46rem,calc(100vw - var(--tb-space-6))); max-width: 46rem; border: var(--tb-border-boundary); border-radius: var(--tb-panel-radius); color: var(--tb-color-text-primary); }
.print-dialog::backdrop { background: rgba(0,0,0,.45); }
.print-dialog form { display: grid; gap: var(--tb-space-4); }
.print-dialog h2,.print-dialog p { margin: 0; }
.print-dialog label { display: flex; gap: var(--tb-space-3); align-items: center; }
.print-dialog [hidden] { display: none !important; }
.print-dialog-actions { display: flex; justify-content: end; gap: var(--tb-space-3); margin-top: var(--tb-space-2); }
.print-active-filters {
  display: grid;
  gap: var(--tb-space-2);
  padding: var(--tb-space-3) var(--tb-space-4);
  border: var(--tb-border-divider);
  border-radius: var(--tb-radius-control);
  background: var(--tb-color-readonly);
}
.print-active-filters h3 {
  margin: 0;
  color: var(--tb-color-text-muted);
  font-family: var(--tb-font-family-mono);
  font-size: var(--tb-type-metadata-size);
  font-weight: var(--tb-font-weight-strong);
  letter-spacing: var(--tb-type-metadata-tracking);
  text-transform: uppercase;
}
.print-filter-list {
  display: grid;
  gap: var(--tb-space-1);
  margin: 0;
  padding: 0;
  list-style: none;
}
.print-filter-list li {
  display: grid;
  grid-template-columns: minmax(7rem, .75fr) minmax(0, 1.25fr);
  gap: var(--tb-space-3);
  align-items: baseline;
}
.print-filter-list li span {
  color: var(--tb-color-text-muted);
  font-family: var(--tb-font-family-mono);
  font-size: var(--tb-type-metadata-size);
  text-transform: uppercase;
}
.print-filter-list li strong {
  color: var(--tb-color-text-primary);
  font-weight: var(--tb-font-weight-strong);
}
.print-filter-empty {
  color: var(--tb-color-text-secondary);
  font-size: var(--tb-type-metadata-size);
}
.print-dialog-actions button {
  min-height: var(--tb-density-control-height);
  padding-inline: var(--tb-space-4);
  border: var(--tb-border-boundary);
  border-radius: var(--tb-button-radius);
  background: var(--tb-color-surface);
  color: var(--tb-color-text-primary);
  cursor: pointer;
  font: inherit;
}
.print-dialog-actions button:hover,
.print-dialog-actions button:focus-visible {
  border-color: var(--tb-color-accent);
  background: var(--tb-color-interaction-hover);
}
.print-dialog-actions #printConfirm {
  border-color: var(--tb-color-accent);
  background: var(--tb-color-accent);
  color: var(--tb-color-accent-contrast);
}
.print-dialog-actions #printConfirm:hover,
.print-dialog-actions #printConfirm:focus-visible {
  border-color: var(--tb-color-accent-hover);
  background: var(--tb-color-accent-hover);
}
.print-paper-control { justify-content: space-between; }
.print-preview { display: grid; gap: var(--tb-space-2); }
.print-preview h3 { margin: 0; font-size: .9rem; }
.print-preview-fit { height: min(46vh,26rem); overflow: hidden; padding: var(--tb-space-3); background: var(--tb-color-canvas); border: var(--tb-border-subtle); }
.print-preview-paper { margin: 0 auto; position: relative; }
.print-preview-markup { box-sizing: border-box; width: var(--print-paper-width); min-height: var(--print-paper-height); padding: var(--print-page-margin, .25in); background: Canvas; color: CanvasText; box-shadow: 0 1px 5px rgba(0,0,0,.22); transform-origin: top left; }
.print-preview-empty { margin: 0; }
.overview-print-preview-frame {
  position: relative;
  margin: 0 auto;
  overflow: hidden;
  background: var(--tb-color-surface);
  border: var(--tb-border-divider);
}
.overview-print-preview-stage {
  position: relative !important;
  display: block !important;
  flex: none !important;
  min-height: 0 !important;
  overflow: hidden !important;
  background-color: var(--tb-color-surface) !important;
  background-image: none !important;
  cursor: default !important;
}
.overview-print-preview-stage .ovtile {
  cursor: default;
}
.location-print-preview-frame {
  position: relative;
  margin: 0 auto;
  overflow: hidden;
  background: var(--tb-color-surface);
  border: var(--tb-border-divider);
}
.location-print-preview-view {
  position: absolute !important;
  inset: 0 auto auto 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) var(--locSide);
  grid-template-rows: minmax(0, 1fr);
  align-items: stretch;
  min-height: 0 !important;
  gap: var(--tb-space-4);
  background: var(--tb-color-surface);
  overflow: hidden;
}
.location-print-preview-view .locstage {
  position: relative !important;
  inset: auto !important;
  right: auto !important;
  bottom: auto !important;
  grid-column: 1;
  grid-row: 1;
  width: auto !important;
  height: 100% !important;
  min-height: 0 !important;
}
.location-print-preview-view .locside {
  position: relative !important;
  inset: auto !important;
  grid-column: 2;
  grid-row: 1;
  width: auto !important;
  height: 100% !important;
  margin: 0 !important;
  overflow: hidden;
}
.location-print-preview-view .locside > .scroll {
  flex: 1 1 auto;
  min-height: 0;
}
.location-print-preview-view .location-print-logo {
  display: block;
  flex: 0 0 auto;
  width: auto;
  min-height: 3rem;
  margin-top: auto;
}

.print-sheet { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,1.1fr) minmax(16rem,1fr); gap:var(--pad); min-height:calc(var(--print-paper-height, 8.5in) - var(--print-page-margin, .25in) - var(--print-page-margin, .25in)); font-family:var(--font); break-after: page; page-break-after:always; }
.print-sheet .print-info-panel { grid-column:3; }
.print-sheet.no-print-mockup > :first-child { grid-column:1 / 3; }
.print-sheet:last-child { break-after: auto; page-break-after: auto; }
.print-sheet .stage {
  min-height: 0;
  background-color: var(--tb-color-surface);
  background-image: none;
}
.print-sheet .pz { display:grid; place-items:center; }
.print-artwork-frame { position:relative; display:inline-flex; max-width:94%; max-height:94%; }
.print-sheet .print-artwork-frame img { display:block; width:auto; max-width:100%; height:auto; max-height:100%; object-fit:contain; }
.print-sheet .mvwrap {
  align-items: center;
  justify-content: center;
  background-color: var(--tb-color-surface);
  background-image: none;
}
.print-mockup-gallery,.print-mode-mockup-gallery { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); grid-auto-rows:minmax(0,1fr); width:100%; height:100%; min-width:0; min-height:0; gap:var(--tb-space-3); padding:var(--tb-space-3); background-color:var(--tb-color-surface); }
.print-mockup-gallery[data-mockup-count="1"],.print-mode-mockup-gallery[data-mockup-count="1"] { grid-template-columns:minmax(0,1fr); }
.print-mockup-gallery figure,.print-mode-mockup-gallery figure { display:grid; grid-template-rows:minmax(0,1fr) auto; place-items:center; min-width:0; min-height:0; margin:0; gap:var(--tb-space-2); }
.print-mockup-gallery img,.print-mode-mockup-gallery img { display:block; width:auto; height:auto; max-width:100%; max-height:100%; min-width:0; min-height:0; object-fit:contain; }
.print-mockup-gallery figcaption,.print-mode-mockup-gallery figcaption { max-width:100%; color:var(--tb-color-text-secondary); font-size:var(--tb-type-metadata-size); line-height:1.25; text-align:center; overflow-wrap:anywhere; }
.print-info { display:flex; flex:1; flex-direction:column; min-height:0; overflow:auto; }
.print-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
.print-field { display:grid; gap:var(--tb-space-1); min-width:0; padding:var(--tb-space-3) var(--tb-space-4); border-right:var(--tb-border-divider); border-bottom:var(--tb-border-divider); }
.print-notes-field { grid-column: 1 / -1; border-right: 0; }
.print-field b { font-family:var(--mono); font-size:9px; color:var(--ink3); text-transform:uppercase; }
.print-field span { overflow-wrap:anywhere; }
.print-logo-row { flex:0 0 auto; min-height:3rem; margin-top:auto; padding:var(--tb-space-4); border-top:var(--tb-border-divider); }
.print-logo-strip { display:flex; min-height:2rem; align-items:flex-end; justify-content:flex-end; gap:var(--tb-space-5); }
.print-logo-name {
  align-self: center;
  max-width: 2.2in;
  color: var(--tb-color-text-primary);
  font-family: var(--tb-font-family-body);
  font-size: var(--tb-type-metadata-size);
  font-weight: var(--tb-font-weight-strong);
  line-height: 1.15;
  text-align: right;
  overflow-wrap: anywhere;
}
.print-preview-markup .print-logo-name,
.batch-print .print-logo-name {
  color: CanvasText;
}
.print-logo-strip img { display:block; max-width:100%; max-height:2rem; object-fit:contain; object-position:right bottom; }
/* Later authoritative multi-logo data can distribute siblings evenly in this same strip. */
.print-logo-strip[data-logo-count]:not([data-logo-count="1"]) { justify-content:space-evenly; }
.overview-print-logo {
  position: absolute;
  inset: auto var(--tb-space-4) var(--tb-space-4) auto;
  z-index: 8;
  display: none;
  width: 3.25in;
  height: .35in;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.overview-print-logo .print-logo-strip {
  min-height: 0;
  padding: 0;
}
.overview-print-logo img {
  max-width: 1.5in;
  max-height: .35in;
}
.overview-print-preview-frame > .overview-print-logo {
  display: block;
}
.print-artwork-measurements { position: absolute; inset: .16in .12in .35in; pointer-events: none; font-family: var(--tb-font-family-mono); font-size: 7pt; }
.print-artwork-measurements svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.print-artwork-measurements line { stroke: currentColor; stroke-width: .5; vector-effect: non-scaling-stroke; }
.print-artwork-width,.print-artwork-height { position: absolute; padding: .01in .03in; background: Canvas; }
.print-artwork-width { top: -.06in; left: 50%; transform: translateX(-50%); }
.print-artwork-height { top: 50%; right: -.13in; transform: translateY(-50%) rotate(90deg); }
.print-material-chips { display: flex; flex-wrap: wrap; gap: .04in; }
.print-material-chip { display: inline-flex; align-items: center; gap: .06in; border: var(--tb-border-divider); border-radius:var(--tb-radius-control); padding: .05in .08in .05in .05in; font-size: 8pt; line-height: 1.2; }
.print-material-swatch { width: .22in; height: .22in; border: 1px solid currentColor; border-radius:2px; background-size: cover; background-position: center; }
.print-material-empty { font-size: 9pt; }
.print-material-canonical { display:none; }
.print-sheet-model-note { margin-top: .12in !important; font-family: var(--tb-font-family-mono); font-size: 8pt !important; }

.print-mode-mockup,.print-mode-mockup-note { display:none; }
body.print-mode .sheet,
body.print-mode .sheet.no-mockup { grid-template-columns:minmax(0,1.1fr) minmax(0,1.1fr) minmax(16rem,1fr); gap:var(--pad); }
body.print-mode .sheet.no-mockup #graphicPanel { grid-column:1 / 3; }
body.print-mode .sheet.no-mockup.has-print-mockup #graphicPanel { grid-column:auto; }
body.print-mode .sheet.no-mockup.has-print-mockup #mockupPanel { display:flex; }
body.print-mode #infoPanel { grid-column:3; }
body:not(.print-mode) #printModeLogoRow { display:none; }
body.print-mode .material-screen-list,
body.print-mode .material-print-list { display:none; }
body.print-mode .print-material-canonical { display:block; padding:var(--tb-space-4); }
body.print-mode #mockupPanel model-viewer,
body.print-mode #mockupPanel .nostate,
body.print-mode #staticMockup { display:none !important; }
body.print-mode .print-mode-mockup[hidden],body.print-mode .print-mode-mockup-note[hidden] { display:none; }
body.print-mode .print-mode-mockup:not([hidden]) { display:grid; width:100%; height:100%; min-height:0; }
body.print-mode .print-mode-mockup-note:not([hidden]) { display:block; margin:auto; padding:var(--tb-space-5); font-family:var(--mono); font-size:var(--tb-type-metadata-size); text-align:center; }
body.print-mode #graphicPanel .stage,
body.print-mode #mockupPanel .mvwrap {
  background-color: var(--tb-color-surface);
  background-image: none !important;
}

body.print-mode .themeControl,
body.print-mode .sheetJump,
body.print-mode .nav,
body.print-mode .sheetSearch,
body.print-mode .zhint,
body.print-mode .mvhint,
body.print-mode .ovhint,
body.print-mode .zoomctl,
body.print-mode .mvctl,
body.print-mode .swap-expand,
body.print-mode .expandbtn,
body.print-mode .versionSelect,
body.print-mode .print-hide,
body.print-mode .contentCopy,
body.print-mode .cpi { display: none !important; }

.app {
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}

button,
input,
select {
  color: inherit;
  font: inherit;
}

button,
[role="button"],
input,
select,
a {
  outline: none;
}

button:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  border-color: var(--tb-color-focus);
  box-shadow: var(--tb-focus-ring);
  outline: none;
}

.skip-link {
  position: fixed;
  z-index: var(--tb-layer-dev-only);
  inset: var(--tb-space-4) auto auto var(--tb-space-4);
  padding: var(--tb-space-4) var(--tb-space-5);
  transform: translateY(-220%);
  background: var(--tb-color-text-primary);
  color: var(--tb-color-text-inverse);
  font-family: var(--tb-font-family-mono);
  font-size: var(--tb-type-metadata-size);
}

.skip-link:focus {
  transform: translateY(0);
}

.bootStatus {
  position: absolute;
  z-index: var(--tb-layer-local-overlay);
  inset: var(--tb-space-5);
  display: grid;
  place-items: center;
  border: var(--tb-border-boundary);
  background: var(--tb-color-info-bg);
  color: var(--tb-color-info-fg);
  font-family: var(--tb-font-family-mono);
  font-size: var(--tb-type-metadata-size);
  letter-spacing: var(--tb-type-metadata-tracking);
}

.bootStatus[hidden] {
  display: none;
}

header.bar,
footer.bar {
  background: var(--tb-color-surface);
  border-color: var(--tb-color-border-default);
}

header.bar {
  min-height: 0;
}

.tabrow {
  position: relative;
  min-height: 3.25rem;
  padding-top: var(--tb-space-4);
}

.viewer-account-actions { position: absolute; top: var(--tb-space-4); inset-inline-end: 0; display: inline-flex; align-items: center; gap: var(--tb-space-2); }
.viewer-account-actions[hidden],
.viewer-dashboard-link[hidden],
.viewer-notification-bell[hidden],
.viewer-notification-popover[hidden] { display: none !important; }
.viewer-dashboard-link,
.viewer-account-link,
.viewer-notification-bell { display: inline-grid; width: var(--tb-icon-button-size); height: var(--tb-icon-button-size); place-items: center; border: 1px solid transparent; border-radius: var(--tb-button-radius); background: transparent; color: var(--tb-color-text-muted); text-decoration: none; }
.viewer-dashboard-link svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.viewer-notification-bell { cursor: pointer; position: relative; }
.viewer-notification-bell svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.viewer-account-avatar { display: grid; width: 1.75rem; height: 1.75rem; place-items: center; border: 1px solid var(--tb-color-border-default); border-radius: 50%; background: var(--tb-color-accent); color: var(--tb-color-accent-contrast); font: var(--tb-font-weight-strong) var(--tb-type-metadata-size)/1 var(--tb-font-family-mono); }
.viewer-dashboard-link:is(:hover, :focus-visible),
.viewer-account-link:is(:hover, :focus-visible),
.viewer-notification-bell:is(:hover, :focus-visible),
.viewer-notification-bell[aria-expanded="true"] { border-color: var(--tb-color-border-default); background: var(--tb-color-interaction-hover); color: var(--tb-color-accent-hover); outline: var(--tb-focus-outline); outline-offset: var(--tb-focus-outline-offset); }
.viewer-notification-bell.has-unread::after { position: absolute; inset-block-start: .34rem; inset-inline-end: .34rem; width: .4rem; height: .4rem; border: 2px solid var(--tb-color-surface); border-radius: 50%; background: #e66b2f; content: ""; }
.viewer-notification-popover { position: absolute; inset-block-start: calc(100% + var(--tb-space-2)); inset-inline-end: 0; z-index: var(--tb-popover-layer); width: min(23rem, calc(100vw - (var(--tb-space-4) * 2))); max-height: min(70vh, 32rem); overflow: auto; padding: var(--tb-space-3); border: var(--tb-border-boundary); border-radius: var(--tb-card-radius); background: var(--tb-color-surface); box-shadow: var(--tb-shadow-popover); }
.viewer-notification-popover-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--tb-space-3); padding-block-end: var(--tb-space-2); border-block-end: var(--tb-border-subtle); }
.viewer-notification-popover-heading a { color: var(--tb-color-text-link); font-size: var(--tb-type-metadata-size); }
.viewer-notification-row { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr); gap: var(--tb-space-2); padding: var(--tb-space-2) 0; color: inherit; text-decoration: none; }
.viewer-notification-row + .viewer-notification-row { border-block-start: var(--tb-border-subtle); }
.viewer-notification-row:is(:hover, :focus-visible) { background: var(--tb-color-interaction-hover); outline: var(--tb-focus-outline); outline-offset: var(--tb-focus-outline-offset); }
.viewer-notification-row-icon { display: inline-grid; width: 1.35rem; height: 1.35rem; place-items: center; color: #e66b2f; }
.viewer-notification-row-icon svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.viewer-notification-row-copy { display: grid; gap: .2rem; min-width: 0; }
.viewer-notification-row-copy strong,
.viewer-notification-row-copy span,
.viewer-notification-row-copy small { overflow: hidden; text-overflow: ellipsis; }
.viewer-notification-row-copy span,
.viewer-notification-row-copy small { color: var(--tb-color-text-muted); font-size: var(--tb-type-metadata-size); line-height: 1.35; }
.viewer-notification-empty { color: var(--tb-color-text-muted); font-size: var(--tb-type-metadata-size); }

.brand {
  min-width: 0;
}

.brand .brandText {
  display: grid;
  min-width: 0;
  max-width: min(20rem, 34vw);
  gap: var(--tb-space-1);
}

.brand .productIcon {
  width: 2rem;
  height: 2.125rem;
  flex: 0 0 auto;
  filter: grayscale(1) saturate(0) contrast(2);
  object-fit: contain;
  transition: filter var(--tb-motion-duration-fast) var(--tb-motion-easing-productive);
}

.brand .productIcon.projectLogo {
  width: auto;
  max-width: 7rem;
  filter: none;
}

.brand:hover .productIcon,
.brand:focus-within .productIcon {
  filter: none;
}

.brand .productWordmark {
  display: none;
  flex: 0 0 auto;
}

.brand #brandLogo {
  max-width: 7rem;
  object-fit: contain;
}

.brand .ptitle {
  overflow: hidden;
  color: var(--tb-color-text-primary);
  font-size: var(--tb-type-body-size);
  font-weight: var(--tb-font-weight-strong);
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand .psub {
  overflow: hidden;
  color: var(--tb-color-text-muted);
  font-family: var(--tb-font-family-mono);
  font-size: var(--tb-type-metadata-size);
  letter-spacing: var(--tb-type-metadata-tracking);
  line-height: var(--tb-type-metadata-line);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand .psub[hidden] {
  display: none;
}

.idx,
.idxg {
  background: var(--tb-color-text-primary);
  color: var(--tb-color-text-inverse);
}

.tabs {
  position: absolute;
  left: 50%;
  bottom: 0;
  gap: 0;
  margin: 0;
  transform: translateX(-50%);
}

.tab {
  position: relative;
  min-width: 8.5rem;
  height: calc(var(--tb-navigation-height) + var(--tb-space-2));
  min-height: calc(var(--tb-navigation-height) + var(--tb-space-2));
  gap: var(--tb-space-4);
  padding-block: 0;
  padding-inline: var(--tb-space-6);
  border: var(--tb-navigation-border);
  border-bottom: var(--tb-border-strong);
  border-radius: var(--tb-radius-control) var(--tb-radius-control) 0 0;
  background: var(--tb-color-surface-raised);
  color: var(--tb-color-text-secondary);
  font-family: var(--tb-font-family-body);
  font-size: var(--tb-type-control-size);
  font-weight: var(--tb-font-weight-regular);
  line-height: var(--tb-type-control-line);
  letter-spacing: 0;
  text-transform: none;
}

.tab + .tab {
  margin-left: calc(var(--tb-border-width-default) * -1);
}

.tab:is(:hover, :focus-visible) {
  z-index: 2;
  border-color: var(--tb-color-accent);
  border-bottom-color: var(--tb-color-border-strong);
  background: var(--tb-color-interaction-hover);
  color: var(--tb-color-accent-hover);
}

.tab:active {
  background: var(--tb-color-interaction-current);
  color: var(--tb-color-accent-hover);
}

.tab.on {
  z-index: 3;
  height: calc(var(--tb-navigation-height) + var(--tb-space-2));
  min-height: calc(var(--tb-navigation-height) + var(--tb-space-2));
  margin-bottom: 0;
  padding-block: 0;
  border: var(--tb-navigation-border);
  border-bottom: var(--tb-border-strong);
  border-bottom-color: transparent;
  background: var(--tb-color-surface);
  color: var(--tb-color-text-primary);
  font-weight: var(--tb-font-weight-strong);
  line-height: var(--tb-type-control-line);
}

.tab.on:is(:hover, :focus-visible) {
  border-color: var(--tb-color-accent);
  border-bottom-color: transparent;
  color: var(--tb-color-text-primary);
}

.tab.on:active {
  background: var(--tb-color-interaction-current);
}

.tab.on::before {
  position: absolute;
  inset: calc(var(--tb-border-width-strong) * -1) var(--tb-space-5) auto;
  z-index: 4;
  height: calc(var(--tb-border-width-strong) + 1px);
  background: var(--tb-color-character-accent);
  content: "";
  pointer-events: none;
}

.tab.on::after {
  position: absolute;
  inset: auto calc(var(--tb-border-width-strong) * -1) calc(var(--tb-border-width-strong) * -3);
  z-index: 4;
  display: block;
  height: calc(var(--tb-border-width-strong) * 5);
  background: var(--tb-color-surface);
  content: "";
  pointer-events: none;
}

.worknav {
  min-height: 3rem;
  border-color: var(--tb-color-border-subtle);
}

.filterToggle,
.printToggle,
.themeToggle,
.chip,
.ffilter,
.nav button,
.jumpToggle,
.picon,
.zoomctl button,
.mvctl button,
.copybtn,
.shbtn,
.loclegend-actions button,
.locpop .go {
  min-height: var(--tb-density-control-height);
  border: var(--tb-border-boundary);
  border-radius: var(--tb-button-radius);
  background: var(--tb-color-surface);
  color: var(--tb-color-text-primary);
  font-size: var(--tb-button-font-size);
}

.filterToggle,
.printToggle,
.themeToggle,
.nav button,
.picon,
.zoomctl button,
.mvctl button,
.versionSelect,
.loclegend-actions button {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.filterToggle,
.printToggle,
.themeToggle,
.nav button,
.picon,
.zoomctl button,
.mvctl button,
.loclegend-actions button {
  transition:
    background var(--tb-motion-duration-fast) var(--tb-motion-easing-productive),
    border-color var(--tb-motion-duration-fast) var(--tb-motion-easing-productive),
    color var(--tb-motion-duration-fast) var(--tb-motion-easing-productive);
}

.filterToggle {
  position: relative;
  min-width: var(--tb-icon-button-size);
  padding-inline: calc((var(--tb-icon-button-size) - 1rem) / 2);
  gap: var(--tb-space-2);
  overflow: visible;
}

.filterToggle.has-filters::before {
  content: "";
  position: absolute;
  inset-block-start: .25rem;
  inset-inline-end: .25rem;
  width: .4rem;
  height: .4rem;
  border: 2px solid var(--tb-color-surface);
  border-radius: 50%;
  background: var(--tb-color-warning-fg);
  pointer-events: none;
}

.filterToggle {
  position: relative;
}

.printToggle {
  border-color: transparent;
  background: transparent;
  color: var(--tb-color-text-secondary);
}

.printToggle.on {
  border-color: transparent;
  background: transparent;
  color: var(--tb-color-text-primary);
}

/* Keep filter state discoverable in the popover without repeating it in the workbar. */
.filterbar {
  min-width: 0;
}

.activeFilters {
  display: none;
}

.filterToggle .badge {
  display: none;
}

.themeControl {
  position: relative;
  flex: 0 0 auto;
}

.themeToggle {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--tb-icon-button-size);
  height: var(--tb-icon-button-size);
  padding: 0;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.themeToggle > svg {
  width: 1rem;
  height: 1rem;
}

.themeMenu {
  position: fixed;
  z-index: var(--tb-popover-layer);
  top: var(--tb-theme-menu-top, 6rem);
  left: var(--tb-theme-menu-left, var(--tb-space-4));
  width: min(18rem, calc(100vw - (var(--tb-space-4) * 2)));
  max-height: calc(100vh - (var(--tb-space-4) * 2));
  overflow-y: auto;
  padding: var(--tb-space-3);
  border: var(--tb-popover-border);
  border-radius: var(--tb-popover-radius);
  background: var(--tb-popover-background);
  box-shadow: var(--tb-popover-shadow);
}

.themeMenu[hidden] {
  display: none;
}

.themeMenuHead {
  padding: var(--tb-space-2) var(--tb-space-3) var(--tb-space-3);
  color: var(--tb-color-text-muted);
  font-family: var(--tb-font-family-mono);
  font-size: var(--tb-type-metadata-size);
  font-weight: var(--tb-font-weight-strong);
  letter-spacing: var(--tb-type-metadata-tracking);
  text-transform: uppercase;
}

.themeChoice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  min-height: var(--tb-density-row-height);
  padding: var(--tb-space-3) var(--tb-space-4);
  border: var(--tb-border-divider);
  border-color: transparent;
  border-radius: var(--tb-radius-control);
  background: transparent;
  color: var(--tb-color-text-secondary);
  text-align: left;
  cursor: pointer;
}

.themeChoice + .themeChoice {
  margin-top: var(--tb-space-1);
}

.themeChoice:is(:hover, :focus-visible) {
  border-color: var(--tb-color-accent);
  background: var(--tb-color-interaction-hover);
  color: var(--tb-color-text-primary);
}

.themeChoice[aria-checked="true"] {
  border-color: var(--tb-color-border-strong);
  background: var(--tb-color-selection);
  color: var(--tb-color-text-primary);
  font-weight: var(--tb-font-weight-strong);
}

.themeChoiceCheck {
  color: var(--tb-color-accent);
  opacity: 0;
}

.themeChoice[aria-checked="true"] .themeChoiceCheck {
  opacity: 1;
}

.filterToggle > svg {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
}

.printToggle,
.nav button,
.picon,
.zoomctl button,
.mvctl button {
  width: var(--tb-icon-button-size);
  height: var(--tb-icon-button-size);
  padding: 0;
}

#graphicPanel .zoomctl,
#mockupPanel .mvctl,
#mockupPanel .static-mockup-toolbar {
  padding: var(--tb-space-2);
  border: var(--tb-border-divider);
  border-color: color-mix(in srgb, var(--tb-color-border-default) 55%, transparent);
  border-radius: var(--tb-radius-control);
  background: color-mix(in srgb, var(--tb-color-surface) 72%, transparent);
  box-shadow: var(--tb-shadow-raised);
}

.swap-expand {
  min-width: var(--tb-icon-button-size);
  touch-action: manipulation;
}

.filterToggle:hover,
.filterToggle.on,
.printToggle:hover,
.printToggle.on,
.themeToggle:hover,
.themeToggle[aria-expanded="true"],
.chip:hover,
.chip.on,
.ffilter:hover,
.ffilter.active,
.nav button:hover:not(:disabled),
.picon:hover,
.picon.on,
.zoomctl button:hover:not(:disabled),
.zoomctl button.on,
.mvctl button:hover:not(:disabled),
.mvctl button.on,
.copybtn:hover,
.shbtn:hover,
.locpop .go:hover {
  border-color: var(--tb-color-accent);
  background: var(--tb-color-interaction-current);
  color: var(--tb-color-text-primary);
}

.printToggle:hover,
.printToggle.on {
  border-color: transparent;
  background: transparent;
}

.printToggle:hover,
.printToggle.on:hover {
  border-color: var(--tb-color-accent);
  background: var(--tb-color-interaction-current);
}

.filterToggle .badge {
  background: var(--tb-color-surface-sunken);
  color: var(--tb-color-text-secondary);
}

.filterToggle .badge[hidden] {
  display: none;
}

.filterToggle.on .badge {
  background: var(--tb-color-accent);
  color: var(--tb-color-accent-contrast);
}

.filterPopover,
.searchResults,
.jumpResults,
.pop,
.ovtip,
.locpop {
  border: var(--tb-popover-border);
  border-radius: var(--tb-popover-radius);
  background: var(--tb-popover-background);
  box-shadow: var(--tb-popover-shadow);
}

.filterPopover {
  overflow: visible;
}

.activeFilters .filterchip {
  border: var(--tb-border-divider);
  border-radius: var(--tb-radius-control);
  background: var(--tb-color-readonly);
  color: var(--tb-color-text-secondary);
}

.searchInput,
.jumpToggle,
.ffilter,
.versionSelect {
  min-height: var(--tb-input-height);
  border: var(--tb-input-border);
  border-radius: var(--tb-input-radius);
  background: var(--tb-color-surface);
  color: var(--tb-color-text-primary);
}

.jumpToggle {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: .2px;
}

.phead .versionSelect {
  width: 5.5rem;
  max-width: 5.5rem;
  padding-inline: .25rem;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.phead .versionSelect:is(:hover, :focus-visible) {
  border-color: var(--tb-color-accent);
  background: var(--tb-color-interaction-current);
}

.facetSelect {
  position: relative;
  min-width: 0;
}

.facetSelect .ffilter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 1.875rem;
  padding: 0 var(--tb-space-4) 0 var(--tb-space-5);
  text-align: left;
}

.facetSelect .ffilter > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.facetSelect .ffilter > svg {
  width: 0.875rem;
  height: 0.875rem;
  flex: 0 0 auto;
  margin-left: var(--tb-space-5);
}

.facetSelect.open .ffilter > svg {
  transform: rotate(180deg);
}

.facetMenu {
  position: absolute;
  z-index: var(--tb-popover-layer);
  inset: calc(100% + var(--tb-space-2)) 0 auto;
  max-height: 13rem;
  overflow-y: auto;
  padding: var(--tb-space-2);
  border: var(--tb-popover-border);
  border-radius: var(--tb-popover-radius);
  background: var(--tb-popover-background);
  box-shadow: var(--tb-popover-shadow);
}

.facetMenu[hidden] {
  display: none;
}

.facetOption {
  display: grid;
  grid-template-columns: 1rem minmax(0, 1fr);
  gap: var(--tb-space-3);
  align-items: center;
  width: 100%;
  min-height: 1.75rem;
  padding: 0 var(--tb-space-3);
  border: 0;
  border-radius: var(--tb-radius-control);
  background: transparent;
  color: var(--tb-color-text-secondary);
  font-family: var(--tb-font-family-body);
  font-size: var(--tb-type-control-size);
  text-align: left;
  cursor: pointer;
}

.facetOption:is(:hover, :focus-visible),
.facetOption[aria-selected="true"] {
  background: var(--tb-color-interaction-current);
  color: var(--tb-color-text-primary);
}

.panel {
  border: var(--tb-panel-border);
  border-radius: var(--tb-panel-radius);
  background: var(--tb-panel-background);
  box-shadow: var(--tb-shadow-card);
}

.panel::before,
.panel::after {
  display: none;
}

.phead {
  position: relative;
  min-height: 3.3125rem;
  box-sizing: border-box;
  padding-left: calc(var(--tb-density-inset) + var(--tb-space-3));
}

.phead::before,
.sectionhdr::before {
  position: absolute;
  inset: var(--tb-space-3) auto auto var(--tb-space-3);
  width: 0.5rem;
  height: 0.5rem;
  border-top: var(--tb-border-strong);
  border-left: var(--tb-border-strong);
  border-color: var(--tb-color-character-accent);
  content: "";
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--tb-motion-duration-fast) var(--tb-motion-easing-productive);
}

.panel:hover > .phead::before,
.panel:focus-within > .phead::before,
.sectionhdr:hover::before,
.sectionhdr:focus-within::before {
  opacity: 1;
}

.phead,
.sectionhdr {
  border-bottom: var(--tb-border-divider);
  background: color-mix(in srgb, var(--tb-color-surface-raised) 82%, var(--tb-color-surface-sunken));
}

.phead .htxt,
.sectionhdr {
  font-size: 13px;
}

.panel:hover > .phead,
.sectionhdr:hover {
  background: color-mix(in srgb, var(--tb-color-interaction-hover) 76%, var(--tb-color-surface-raised));
}

.stage,
.ovstage,
.locstage {
  cursor: default;
}

.stage,
.ovstage {
  background-color: var(--tb-color-surface);
}

.scalebar,
.dimbar,
.dimlabel {
  background: color-mix(in srgb, var(--tb-color-surface) 72%, transparent);
  border: var(--tb-border-divider);
  border-color: color-mix(in srgb, var(--tb-color-border-default) 55%, transparent);
  box-shadow: var(--tb-shadow-raised);
  color: var(--tb-color-text-primary);
}

.scalebar .track {
  border-color: currentColor;
}

.scalebar .label {
  color: inherit;
}

.dimlabel {
  padding: 1px 5px;
}

.mvwrap {
  background-color: var(--tb-color-surface);
  background-image: radial-gradient(var(--tb-color-border-subtle) 1.3px, transparent 1.4px);
}

.mvwrap.static-image .static-mockup {
  background: transparent;
}

.stage.grabbing,
.ovstage.grabbing,
.locstage.grabbing {
  cursor: grabbing;
}

.zhint,
.ovhint,
.lochint,
.mvhint {
  padding: var(--tb-space-3) var(--tb-space-4);
  border: var(--tb-border-divider);
  background: color-mix(in srgb, var(--tb-color-surface) 90%, transparent);
  color: var(--tb-color-text-secondary);
}

.measure-svg line {
  stroke: #ffffff;
  stroke-width: 2;
  mix-blend-mode: difference;
}

.measure-svg circle {
  fill: #ffffff;
  stroke: #ffffff;
  stroke-width: 2;
  mix-blend-mode: difference;
}

.measure-svg text {
  fill: #ffffff;
  stroke: transparent;
  stroke-width: 0;
  mix-blend-mode: difference;
}

.ctext {
  position: relative;
  padding: var(--tb-density-inset) calc(var(--tb-density-inset) + 2.5rem) var(--tb-density-inset) var(--tb-density-inset);
  white-space: normal;
}

.ctext p {
  margin: 0 0 var(--tb-space-4);
}

.ctext p:last-child {
  margin-bottom: 0;
}

.ctext .contentCopy {
  position: absolute;
  inset: var(--tb-space-4) var(--tb-space-4) auto auto;
}

.info .scroll {
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.info .gitem .kval.big {
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: normal;
}

.hierarchy-list {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 0;
}

.hierarchy-list:has(> .hierarchy-row:last-child:nth-child(odd))::after {
  content: "";
  position: absolute;
  inset-inline: 50% 0;
  inset-block-end: 0;
  border-block-end: var(--tb-border-divider);
  pointer-events: none;
}

.print-fields {
  position: relative;
}

.print-fields:has(> .print-field:last-child:nth-child(odd))::after {
  content: "";
  position: absolute;
  inset-inline: 50% 0;
  inset-block-end: 0;
  border-block-end: var(--tb-border-divider);
  pointer-events: none;
}

/* Keep Information dividers single, aligned, and on the shared divider token. */
.info .scroll > .row,
.info .scroll > .gitem,
.info .scroll > .sectionhdr,
.info .scroll > .print-hide > .sectionhdr,
.info .scroll .hierarchy-row,
.info .scroll .mountgrid .cell {
  border-bottom: var(--tb-border-divider);
}

.info .scroll > .sectionhdr,
.info .scroll > .print-hide > .sectionhdr {
  border-top: 0;
}

.info .scroll > .print-hide + .sectionhdr,
.info .scroll > .print-material-canonical + .sectionhdr {
  border-top: var(--tb-border-divider);
}

.info .scroll .hierarchy-row + .hierarchy-row {
  border-top: 0;
}

.info .scroll > .gitem .cell + .cell {
  border-left: var(--tb-border-divider);
}

.info .scroll .mountgrid .cell:nth-child(odd) {
  border-right: var(--tb-border-divider);
}

.hierarchy-row {
  display: block;
  min-width: 0;
  padding: var(--tb-space-4) var(--tb-space-5);
  border-right: var(--tb-border-divider);
  border-bottom: var(--tb-border-divider);
}

.hierarchy-row .hierarchy-level,
.hierarchy-row .hierarchy-value {
  display: block;
}

.hierarchy-row .hierarchy-level {
  margin-bottom: var(--tb-space-1);
}

.hierarchy-row:nth-child(even) {
  border-right: 0;
}

.hierarchy-row::before,
.hierarchy-row::after {
  display: none;
}

.material-screen-list {
  container-type: inline-size;
}

.material-screen-list .swatches {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: var(--tb-space-3);
  padding: var(--tb-space-4);
  flex-wrap: wrap;
}

.material-screen-list .sw {
  width: 3.5rem;
  min-width: 3.5rem;
  max-width: 3.5rem;
  aspect-ratio: 1;
  height: auto;
}

/* A transformed swatch becomes the containing block for its fixed tooltip,
   which makes the Information scrollbar jump while the chip is hovered. */
.material-screen-list .sw:hover {
  transform: none;
}

.material-screen-list .sw .tip {
  position: fixed;
  z-index: var(--tb-layer-dev-only);
  inset: auto;
  transform: none;
}

.material-screen-list .sw .tip::after {
  display: none;
}

.ovgroupbox.outer {
  border: var(--tb-border-divider);
  border-color: var(--tb-color-border-strong);
  background: transparent;
}

.ovgroupbox.inner {
  border: var(--tb-border-divider);
  border-style: dashed;
  border-color: var(--tb-color-border-default);
  background: transparent;
  box-shadow: none;
}

.ovgroup-labels {
  position: absolute;
  inset: 0;
  z-index: 5;
  overflow: hidden;
  pointer-events: none;
}

.ovgroup-labels .ovglabel {
  position: absolute;
  padding: var(--tb-space-1) var(--tb-space-2);
  background: var(--tb-color-surface);
  color: var(--tb-color-text-primary);
  font-family: var(--tb-font-family-mono);
  font-size: var(--tb-type-metadata-size);
  font-weight: var(--tb-font-weight-strong);
  letter-spacing: var(--tb-type-metadata-tracking);
  line-height: 1.25;
  text-transform: uppercase;
  white-space: nowrap;
}

.ovgroup-labels .ovglabel.outer {
  color: var(--tb-color-text-secondary);
}

.ovtile {
  border: 0;
  background: var(--tb-color-surface);
}

.ovtile img {
  object-fit: contain;
  background: var(--tb-color-surface);
}

.ovtile:hover,
.ovtile:focus-visible {
  box-shadow: 0 0 0 var(--tb-border-width-strong) var(--tb-color-accent), var(--tb-shadow-raised);
}

.ovtip {
  pointer-events: auto;
}

.ovtip .thd,
.locpop .hd {
  background: var(--tb-color-text-primary);
  color: var(--tb-color-text-inverse);
}

.ovtip .thd span {
  color: var(--tb-color-text-inverse);
}

.ovtip .thd {
  align-items: center;
}

.ovtip .thd .ovtip-code {
  color: var(--tb-color-text-inverse);
  font-family: var(--tb-font-family-mono);
  font-size: var(--tb-type-metadata-size);
  font-weight: var(--tb-font-weight-regular);
  letter-spacing: var(--tb-type-metadata-tracking);
}

.ovtip .thd .ovtip-close {
  display: inline-grid;
  width: var(--tb-icon-button-size);
  height: var(--tb-icon-button-size);
  flex: 0 0 auto;
  place-items: center;
  margin: calc(var(--tb-space-2) * -1) calc(var(--tb-space-2) * -1) calc(var(--tb-space-2) * -1) auto;
  border: 0;
  border-radius: var(--tb-radius-control);
  background: transparent;
  color: var(--tb-color-text-inverse);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}

.ovtip .thd .ovtip-close:is(:hover, :focus-visible) {
  background: var(--tb-color-interaction-current);
  color: var(--tb-color-text-primary);
  outline: var(--tb-focus-outline);
  outline-offset: var(--tb-focus-outline-offset);
}

.ovtip .ov-status {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: var(--tb-space-1) var(--tb-space-2);
  border: var(--tb-status-border-width) solid var(--tb-color-border-default);
  border-radius: var(--tb-status-radius);
  font-family: var(--tb-status-font-family);
  font-size: var(--tb-status-font-size);
  font-weight: var(--tb-font-weight-strong);
  line-height: 1.25;
}

.ovtip .ov-status--draft {
  border-color: var(--tb-status-workflow-draft-border);
  background: var(--tb-status-workflow-draft-bg);
  color: var(--tb-status-workflow-draft-fg);
}

.ovtip .ov-status--review {
  border-color: var(--tb-status-workflow-in-review-border);
  background: var(--tb-status-workflow-in-review-bg);
  color: var(--tb-status-workflow-in-review-fg);
}

.ovtip .ov-status--approved {
  border-color: var(--tb-status-workflow-approved-border);
  background: var(--tb-status-workflow-approved-bg);
  color: var(--tb-status-workflow-approved-fg);
}

.ovtip .ov-status--published {
  border-color: var(--tb-status-workflow-published-border);
  background: var(--tb-status-workflow-published-bg);
  color: var(--tb-status-workflow-published-fg);
}

.ovtip .ov-status--caution {
  border-color: var(--tb-color-warning-border);
  background: var(--tb-color-warning-bg);
  color: var(--tb-color-warning-fg);
}

.ovtip .ov-status--critical {
  border-color: var(--tb-color-error-border);
  background: var(--tb-color-error-bg);
  color: var(--tb-color-error-fg);
}

.ovtip .ov-status--archived {
  border-color: var(--tb-status-workflow-archived-border);
  background: var(--tb-status-workflow-archived-bg);
  color: var(--tb-status-workflow-archived-fg);
}

.ovtip .ov-status--release {
  border-color: var(--tb-color-success-border);
  background: var(--tb-release-publication-success-bg);
  color: var(--tb-release-publication-success-fg);
}

.ovtip .actions {
  display: flex;
  justify-content: center;
  gap: var(--tb-space-4);
  padding: var(--tb-space-4) var(--tb-space-5) var(--tb-space-5);
}

.ovtip .actions button {
  min-height: var(--tb-button-height);
  padding-inline: var(--tb-button-padding-inline);
  border: 0;
  border-radius: var(--tb-button-radius);
  background: var(--tb-color-accent);
  color: var(--tb-color-accent-contrast);
  cursor: pointer;
}

.ovtip .actions button:is(:hover, :focus-visible) {
  background: var(--tb-color-interaction-current);
  color: var(--tb-color-text-primary);
  outline: var(--tb-focus-outline);
  outline-offset: var(--tb-focus-outline-offset);
}

body.print-mode #overview .ovstage {
  background-image: none !important;
  cursor: default;
}

body.print-mode[data-print-mode-view="location"] #locationView {
  position: relative;
  inset: auto;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) var(--locSide);
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: stretch;
  width: 100%;
  height: 100%;
  min-height: 0;
  gap: var(--tb-space-4);
  overflow: hidden;
}

body.print-mode[data-print-mode-view="location"] #locationView .lochint,
body.print-mode[data-print-mode-view="location"] #locationView .zoomctl,
body.print-mode[data-print-mode-view="location"] #locationView .locpanel,
body.print-mode[data-print-mode-view="location"] #locationView .locpop,
body.print-mode[data-print-mode-view="location"] #locationView .loccoord,
body.print-mode[data-print-mode-view="location"] #locationView .locgrid,
body.print-mode[data-print-mode-view="location"] #locationView .measure-svg,
body.print-mode[data-print-mode-view="location"] #locationView .loclegend-actions {
  display: none !important;
}

body.print-mode[data-print-mode-view="location"] #locationView .locstage {
  position: relative;
  inset: auto;
  right: auto;
  bottom: auto;
  grid-column: 1;
  grid-row: 1;
  width: auto;
  height: 100%;
  min-height: 0;
}

body.print-mode[data-print-mode-view="location"] #locationView .locside {
  position: relative;
  inset: auto;
  grid-column: 2;
  grid-row: 1;
  width: auto;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body:not(.print-mode) #locationView .location-print-logo {
  display: none;
}

body.print-mode[data-print-mode-view="location"] #locationView .location-print-logo {
  display: block;
  grid-column: 1 / -1;
  grid-row: 2;
  width: auto;
  min-height: 3rem;
  margin: 0;
}
  display: block;
}

.locModeSwitch,
.locpanel,
.loccoord,
.locEditToggle {
  display: none !important;
}

.locside {
  border-color: var(--tb-color-border-default);
  background: var(--tb-color-surface);
}

.locstage {
  background: var(--tb-color-surface-sunken);
}

.loccanvas img {
  background: var(--tb-color-surface);
  box-shadow: 0 0 0 1px var(--tb-color-border-subtle);
}

.locbar {
  background: color-mix(in srgb, var(--tb-color-surface) 92%, transparent);
  border-color: var(--tb-color-border-default);
  box-shadow: var(--tb-shadow-raised);
  color: var(--tb-color-text-primary);
}

.locside,
.locpanel,
.loccoord,
.locpop {
  border-color: var(--tb-color-border-default);
  background: var(--tb-color-surface);
  color: var(--tb-color-text-primary);
}

.locpanel .mode,
.locpanel .mode button,
.locpanel select,
.loccalrow input,
.loctargetrow button,
.locpending span,
.locactions button,
.loccalrow button,
.locEditToggle,
.loccustomcolor input,
.loccustomcolor button,
.loccoord .hd button,
.locmodel-switch button,
.locpop .thumb,
.locmodel {
  border-color: var(--tb-color-border-default);
  background: var(--tb-color-surface);
  color: var(--tb-color-text-primary);
}

/* Keep the marker preview contained after the themed background shorthand. */
.locpop .thumb {
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.locmarker .loclabel {
  border-color: var(--tb-color-border-default);
  background: var(--tb-color-surface);
  color: var(--tb-color-text-primary);
  box-shadow: var(--tb-shadow-raised);
}

.locmarker.sel .mark-fill {
  fill: var(--tb-color-surface);
}

.locselhead,
.locrow {
  background: var(--tb-color-surface);
  color: var(--tb-color-text-primary);
}

.locselhead:hover,
.locrow:hover,
.locrow.hover {
  background: var(--tb-color-interaction-hover);
}

.loczonehead,
.loczonehead:hover span:first-child,
.locrow .sub,
.loczonehead .count {
  color: var(--tb-color-text-secondary);
}

.locrow .sub,
.loczonehead .count,
.locnote,
.locmeta .name,
.locmeta .sub {
  color: var(--tb-color-text-muted);
}

.locpop .bd,
.loccoord pre {
  color: var(--tb-color-text-secondary);
}

.locpop .bd b,
.loccoord .hd b {
  color: var(--tb-color-text-primary);
}

.loclegend-actions button {
  position: relative;
  width: var(--tb-icon-button-size);
  padding: 0;
  font-size: 1rem;
}

.loclegend-actions button:is(:hover, :focus-visible) {
  border-color: var(--tb-color-accent);
  background: var(--tb-color-interaction-current);
  color: var(--tb-color-text-primary);
}

button[data-tooltip] {
  position: relative;
}

/* Location markers live in the transformed plan canvas; keep their tooltip
   affordance without letting the shared control rule change their anchor. */
.locmarker[data-tooltip] {
  position: absolute;
}

button[data-tooltip]::after {
  position: absolute;
  inset-block-start: calc(100% + var(--tb-space-2));
  inset-inline-start: 50%;
  z-index: var(--tb-popover-layer);
  width: max-content;
  max-width: 16rem;
  padding: var(--tb-space-1) var(--tb-space-2);
  border: var(--tb-border-divider);
  border-radius: var(--tb-radius-control);
  background: var(--tb-popover-background);
  box-shadow: var(--tb-popover-shadow);
  color: var(--tb-color-text-primary);
  content: attr(data-tooltip);
  font-family: var(--tb-font-family-body);
  font-size: var(--tb-type-metadata-size);
  font-weight: var(--tb-font-weight-regular);
  line-height: 1.25;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  text-transform: none;
  transform: translateX(-50%);
}

.filterToggle[data-tooltip]::after,
.printToggle[data-tooltip]::after {
  inset-inline-start: 0;
  transform: none;
}

.zoomctl button[data-tooltip]::after,
.mvctl button[data-tooltip]::after,
.loclegend-actions button[data-tooltip]::after {
  inset-inline-start: auto;
  inset-inline-end: 0;
  transform: none;
}

.static-mockup-toolbar button[data-tooltip]::after {
  inset-block-start: 50%;
  inset-inline-start: auto;
  inset-inline-end: calc(100% + var(--tb-space-2));
  transform: translateY(-50%);
}

#zreset[data-tooltip]::after,
#mvReset[data-tooltip]::after {
  inset-block-start: 50%;
  inset-inline-start: auto;
  inset-inline-end: calc(100% + var(--tb-space-2));
  transform: translateY(-50%);
}

/* MG3 static gallery: contained images with browser-local Single/Arrange state. */
.static-mockup { position: relative; margin: 0; }
.static-mockup-toolbar { position:absolute; inset-inline-end:10px; inset-block-end:10px; z-index:4; display:flex; flex-direction:column; gap:4px; width:auto; max-height:calc(100% - 20px); }
.swap-expand .swapIcon { width: 16px; height: 16px; display: block; }
.static-mockup-thumbnails button,
.static-mockup-arrange button { border: var(--tb-border-divider); border-radius: var(--tb-radius-control); background: var(--tb-color-surface); color: var(--tb-color-text-primary); cursor: pointer; }
.static-mockup-toolbar[hidden] { display:none; }
.static-mockup-single { display:grid; flex:1; min-height:0; grid-template-rows:minmax(0,1fr) auto; place-items:center; gap:var(--tb-space-2); width:100%; }
.static-mockup-single[hidden] { display:none; }
.static-mockup-single img { display:block; width:auto; height:auto; max-width:100%; max-height:100%; min-width:0; min-height:0; align-self:center; justify-self:center; object-fit:contain; }
.static-mockup-single figcaption:empty { display:none; }
.static-mockup-thumbnails { display: flex; gap: var(--tb-space-2); max-width: 100%; overflow-x: auto; padding: var(--tb-space-1); }
.static-mockup-thumbnails button { flex: 0 0 auto; width: 3.5rem; height: 2.5rem; padding: 0; overflow: hidden; }
.static-mockup-thumbnails button[aria-current="true"],
.static-mockup-thumbnails button:is(:hover, :focus-visible),
.static-mockup-arrange button:is(:hover, :focus-visible) { border-color: var(--tb-color-accent); outline: var(--tb-focus-outline); outline-offset: var(--tb-focus-outline-offset); }
.static-mockup-thumbnails img { width: 100%; height: 100%; object-fit: contain; }
.static-mockup-arrange { display: grid; flex: 1; min-height: 0; width: 100%; gap: var(--tb-space-3); }
.static-mockup-arrange[hidden],.static-mockup-toolbar button[hidden],.static-mockup-thumbnails[hidden] { display:none; }
.static-mockup-arrange button { display: flex; min-width: 0; min-height: 0; flex-direction: column; align-items: center; justify-content: center; gap: var(--tb-space-1); padding: var(--tb-space-2); overflow: hidden; }
.static-mockup-arrange img { display: block; min-width: 0; min-height: 0; max-width: 100%; max-height: 100%; flex: 1; object-fit: contain; }
.static-mockup-arrange span { max-width: 100%; overflow: hidden; color: var(--tb-color-text-secondary); font-size: var(--tb-type-metadata-size); text-overflow: ellipsis; white-space: nowrap; }
.static-mockup.arrange .static-mockup-arrange { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.static-mockup.arrange .static-mockup-arrange:has(button:nth-child(3):last-child) { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-rows: repeat(2, minmax(0, 1fr)); }
.static-mockup.arrange .static-mockup-arrange:has(button:nth-child(3):last-child) button:first-child { grid-row: 1 / 3; }
@media (max-width: 40rem) { .static-mockup.arrange .static-mockup-arrange, .static-mockup.arrange .static-mockup-arrange:has(button:nth-child(3):last-child) { grid-template-columns: minmax(0, 1fr); grid-template-rows: repeat(auto-fit, minmax(8rem, 1fr)); } .static-mockup.arrange .static-mockup-arrange:has(button:nth-child(3):last-child) button:first-child { grid-row: auto; } }

button[data-tooltip]:is(:hover, :focus-visible)::after {
  opacity: 1;
}

#filterToggle.on::after {
  opacity: 0;
}

.locrow {
  min-height: var(--tb-density-row-height);
  border-radius: var(--tb-radius-control);
  background: var(--tb-color-surface);
}

.locrow:hover,
.locrow.hover,
.locrow[aria-current="true"] {
  border-color: var(--tb-color-accent);
  background: var(--tb-color-interaction-current);
}

.loczonehead,
.locselhead,
.locrow {
  --locColor: var(--tb-color-text-primary);
}

.locpop .go {
  width: 100%;
  background: var(--tb-color-accent);
  color: var(--tb-color-accent-contrast);
}

.loc-empty,.nostate,.empty{color:var(--tb-color-text-muted);font-family:var(--tb-font-family-body)}

footer .accent {
  color: var(--tb-color-character-accent);
}

@media (max-width: 72rem) {
  header.bar {
    padding-inline: var(--tb-space-5);
  }

  .tabrow {
    align-items: center;
    flex-wrap: wrap;
    gap: var(--tb-space-3);
  }

  .brand {
    width: 100%;
  }

  .tabs {
    position: static;
    width: 100%;
    justify-content: center;
    overflow-x: auto;
    transform: none;
  }
}

@media (max-width: 56rem) {
  .worknav {
    grid-template-columns: minmax(0, 1fr);
  }

  .worknavLeft,
  .nav,
  .sheetSearch {
    grid-column: 1;
  }

  .worknavLeft {
    min-width: 0;
    overflow-x: auto;
  }

  .sheet {
    grid-template-columns: minmax(0, 1fr) minmax(17rem, 0.75fr);
    overflow: auto;
  }

  #mockupPanel {
    display: none;
  }

  .sheet.expand-mockup #mockupPanel {
    display: flex;
  }

  .locview {
    --locSide: min(40vw, 22rem);
  }
}

@media (max-width: 40rem) {
  .activeFilters {
    display: none;
  }

  .brand .brandText {
    max-width: min(12rem, 34vw);
  }

  .sheetSearch {
    min-width: 0;
  }

  .tabs {
    justify-content: start;
  }

  .tab {
    min-width: 7.5rem;
    padding-inline: var(--tb-space-5);
  }

  .sheet {
    grid-template-columns: minmax(18rem, 1fr);
    grid-auto-rows: minmax(28rem, 65vh) minmax(18rem, auto);
    align-content: start;
  }

  #graphicPanel {
    min-height: 28rem;
  }

  #infoPanel {
    min-height: 18rem;
  }

  .locstage {
    right: 0;
    bottom: 42%;
  }

  .locside {
    top: 58%;
    width: 100%;
    border-top: var(--tb-border-boundary);
    border-left: 0;
  }

  .locctl {
    right: var(--tb-space-4);
    top: var(--tb-space-4);
  }

}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: var(--tb-motion-reduced-duration) !important;
    animation-duration: var(--tb-motion-reduced-duration) !important;
    animation-iteration-count: var(--tb-motion-reduced-iteration) !important;
  }
}

@media (forced-colors: active) {
  .swap-expand {
    border-color: ButtonText;
    background: Canvas;
    color: CanvasText;
    forced-color-adjust: auto;
  }

  .themeToggle,
  .themeMenu,
  .themeChoice {
    border-color: ButtonText;
    background: Canvas;
    color: CanvasText;
    forced-color-adjust: auto;
  }

  .themeChoice[aria-checked="true"] {
    outline: 2px solid Highlight;
    outline-offset: -3px;
  }

  .themeChoice[aria-checked="true"] .themeChoiceCheck {
    color: Highlight;
  }
}

.review-mode-toggle { display: inline-flex; align-items: center; justify-content: center; gap: var(--tb-space-1); box-sizing: border-box; width: 8.75rem; min-height: var(--tb-density-control-height); border: var(--tb-border-width-default) solid var(--tb-color-accent); border-radius: var(--tb-button-radius); background: var(--tb-color-surface); color: var(--tb-color-accent); cursor: pointer; font: inherit; font-family: var(--tb-font-family-mono); font-size: var(--tb-type-metadata-size); font-weight: var(--tb-font-weight-strong); letter-spacing: var(--tb-type-metadata-tracking); padding: 0 var(--tb-space-3); transition: background-color var(--tb-motion-fast), border-color var(--tb-motion-fast), color var(--tb-motion-fast); white-space: nowrap; }

.review-mode-toggle svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.review-mode-toggle:hover,
.review-mode-toggle:focus-visible { border-color: var(--tb-color-accent-hover); background: var(--tb-color-interaction-hover); color: var(--tb-color-accent-hover); outline: var(--tb-focus-outline); outline-offset: var(--tb-focus-outline-offset); }

.review-mode-toggle.on { border-color: var(--tb-color-accent); background: var(--tb-color-surface); color: var(--tb-color-accent); box-shadow: inset 0 -3px 0 var(--tb-color-accent); }

.review-mode-toggle.on:is(:hover, :focus-visible) { border-color: var(--tb-color-accent-hover); background: var(--tb-color-interaction-hover); color: var(--tb-color-accent-hover); box-shadow: inset 0 -3px 0 var(--tb-color-accent-hover); }

.review-mode-toggle[data-tooltip]::after {
  inset-block-start: calc(100% + var(--tb-space-2));
  inset-inline-start: auto;
  inset-inline-end: 0;
  z-index: var(--tb-popover-layer);
  width: max-content;
  max-width: min(16rem, calc(100vw - (var(--tb-space-4) * 2)));
  padding: var(--tb-space-1) var(--tb-space-2);
  border: var(--tb-border-divider);
  border-radius: var(--tb-radius-control);
  background: var(--tb-popover-background);
  box-shadow: var(--tb-popover-shadow);
  color: var(--tb-color-text-primary);
  content: attr(data-tooltip);
  font-family: var(--tb-font-family-body);
  font-size: var(--tb-type-metadata-size);
  font-weight: var(--tb-font-weight-regular);
  line-height: 1.25;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  text-transform: none;
  white-space: normal;
}

.review-mode-toggle[data-tooltip]:is(:hover, :focus-visible)::after { opacity: 1; }

#reviewApprovalMount { display: inline-flex; align-items: center; }
#reviewApprovalMount[hidden] { display: none; }
.review-viewer-approval-mount-inner { display: inline-flex; align-items: center; gap: var(--tb-space-2); min-width: 0; }
.review-viewer-approval-check.review-viewer-top-approval { min-height: var(--tb-density-control-height); height: var(--tb-density-control-height); border-radius: var(--tb-button-radius); padding: 0 var(--tb-space-3); box-shadow: none; }
.review-viewer-approval-check.review-viewer-top-approval .review-viewer-approval-check-box { width: 1rem; height: 1rem; border-width: var(--tb-border-width-default); }
.review-viewer-approval-check.review-viewer-top-approval .review-viewer-approval-check-box svg { width: .75rem; height: .75rem; }
.review-viewer-client-approval-status { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--tb-space-2); box-sizing: border-box; flex: 0 0 15rem; width: 15rem; min-width: 15rem; max-width: 15rem; height: var(--tb-density-control-height); min-height: var(--tb-density-control-height); padding: 0 var(--tb-space-3); border: var(--tb-border-width-default) solid var(--tb-color-border-default); border-radius: var(--tb-button-radius); background: var(--tb-color-surface-raised); color: var(--tb-color-text-secondary); font: var(--tb-font-weight-strong) var(--tb-type-metadata-size)/1.2 var(--tb-font-family-mono); white-space: nowrap; }
.review-viewer-client-approval-status.is-approved { border-color: var(--tb-color-success-border); background: var(--tb-color-success-bg); color: var(--tb-color-success-fg); }
.review-viewer-client-approval-status.is-pending { border-style: dotted; }
.review-viewer-client-approval-check { display: grid; width: 1rem; height: 1rem; place-items: center; border: var(--tb-border-width-default) solid currentColor; border-radius: 50%; }
.review-viewer-client-approval-status.is-approved .review-viewer-client-approval-check { border-color: var(--tb-color-success-fg); background: var(--tb-color-success-fg); color: var(--tb-color-success-bg); }
.review-viewer-client-approval-check svg { display: block; width: .72rem; height: .72rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.6; }
.review-viewer-client-approval-status[data-tooltip]::after { position: absolute; inset-block-start: calc(100% + var(--tb-space-2)); inset-inline-end: 0; z-index: var(--tb-popover-layer); width: max-content; max-width: min(20rem, calc(100vw - (var(--tb-space-4) * 2))); padding: var(--tb-space-1) var(--tb-space-2); border: var(--tb-border-divider); border-radius: var(--tb-radius-control); background: var(--tb-popover-background); box-shadow: var(--tb-popover-shadow); color: var(--tb-color-text-primary); content: attr(data-tooltip); font-family: var(--tb-font-family-body); font-size: var(--tb-type-metadata-size); font-weight: var(--tb-font-weight-regular); line-height: 1.25; opacity: 0; pointer-events: none; text-align: left; white-space: normal; }
.review-viewer-client-approval-status[data-tooltip]:is(:hover, :focus-visible)::after { opacity: 1; }

.review-viewer-panel {
  overflow: auto;
  min-height: 0;
}

.review-viewer-panel:has(.review-viewer-filter-popover:not([hidden])) { overflow: visible; }

.review-viewer-location-body{padding:var(--tb-space-3);flex:1;min-height:0}
.review-viewer-content { display: grid; gap: var(--tb-space-2); padding: var(--tb-space-2); background: var(--tb-color-canvas); }

.review-viewer-empty,
.review-viewer-message { display: grid; gap: var(--tb-space-1); margin: 0; padding: var(--tb-space-3); border: var(--tb-border-divider); border-radius: var(--tb-radius-control); background: var(--tb-color-surface-raised); }

.review-viewer-empty strong { color: var(--tb-color-text-primary); font-size: var(--tb-type-body-size); }
.review-viewer-empty p,
.review-viewer-muted,
.review-viewer-message { color: var(--tb-color-text-secondary); font-size: var(--tb-type-metadata-size); line-height: 1.45; }

.review-viewer-kicker { color: var(--tb-color-text-muted); font-family: var(--tb-font-family-mono); font-size: var(--tb-type-metadata-size); font-weight: var(--tb-font-weight-strong); letter-spacing: var(--tb-type-metadata-tracking); text-transform: uppercase; }

.review-viewer-form {
  display: grid; gap: var(--tb-space-2); padding: var(--tb-space-3); border: var(--tb-border-divider); border-radius: var(--tb-radius-control); background: var(--tb-color-surface-sunken);
}

.review-viewer-form label {
  display: grid; gap: var(--tb-space-1); color: var(--tb-color-text-secondary); font-family: var(--tb-font-family-mono); font-size: var(--tb-type-metadata-size); letter-spacing: var(--tb-type-metadata-tracking); text-transform: uppercase;
}

.review-viewer-form textarea,
.review-viewer-form select {
  width: 100%; border: var(--tb-border-boundary); border-radius: var(--tb-radius-control); background: var(--tb-color-surface); color: var(--tb-color-text-primary); font: inherit; letter-spacing: normal; padding: var(--tb-space-2); text-transform: none;
}

.review-viewer-form textarea { resize: vertical; }
.review-viewer-form button,
.review-viewer-message button {
  min-height: var(--tb-density-control-height); width: fit-content; border: var(--tb-border-boundary); border-radius: var(--tb-button-radius); background: var(--tb-color-surface); color: var(--tb-color-text-primary); cursor: pointer; font: inherit; padding: 0 var(--tb-space-3);
}

.review-viewer-form button:hover,
.review-viewer-form button:focus-visible,
.review-viewer-message button:hover,
.review-viewer-message button:focus-visible { border-color: var(--tb-color-accent); background: var(--tb-color-interaction-hover); color: var(--tb-color-text-link); }

.review-viewer-replies { display: grid; gap: var(--tb-space-2); margin: var(--tb-space-2) 0 0 2.75rem; padding-inline-start: var(--tb-space-2); border-inline-start: var(--tb-border-width-default) solid var(--tb-color-border-default); }

.review-viewer-replies-disclosure { margin: 0; }
.review-viewer-replies-disclosure > summary { list-style: none; }

.review-viewer-replies-disclosure > summary::-webkit-details-marker { display: none; }

.review-viewer-replies-toggle {
  display: inline-flex; align-items: center; gap: var(--tb-space-1); min-height: var(--tb-icon-button-size); margin: var(--tb-space-1) 0 0 2.75rem; padding: 0 var(--tb-space-1); border: var(--tb-border-width-default) solid transparent; border-radius: var(--tb-button-radius); background: transparent; color: var(--tb-color-text-link); cursor: pointer; font-family: var(--tb-font-family-mono); font-size: var(--tb-type-metadata-size); font-weight: var(--tb-font-weight-strong);
}

.review-viewer-replies-toggle:is(:hover, :focus-visible) { border-color: var(--tb-color-accent); background: var(--tb-color-interaction-hover); outline: var(--tb-focus-outline); outline-offset: var(--tb-focus-outline-offset); }

.review-viewer-replies-toggle svg {
  width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; transition: transform var(--tb-motion-duration-fast) var(--tb-motion-easing-productive);
}

.review-viewer-replies-disclosure[open] > .review-viewer-replies-toggle svg { transform: rotate(90deg); }

.review-viewer-message.is-error { border-color: var(--tb-color-error-border); background: var(--tb-color-error-bg); color: var(--tb-color-error-fg); }

.review-viewer-status-dock { position: sticky; z-index: 2; bottom: 0; flex: 0 0 auto; padding: var(--tb-space-2) var(--tb-space-3); border-top: var(--tb-border-divider); background: color-mix(in srgb, var(--tb-color-surface-raised) 94%, var(--tb-color-canvas)); box-shadow: var(--tb-shadow-raised); }

.review-viewer-status-dock .review-viewer-composer { border: 0; border-radius: 0; background: transparent; }

.review-viewer-approval-check { display: inline-flex; align-items: center; justify-content: center; gap: var(--tb-space-2); min-height: 3.25rem; border: var(--tb-border-width-default) solid var(--tb-color-border-strong); border-radius: var(--tb-feedback-radius); background: var(--tb-color-surface); color: var(--tb-color-text-primary); cursor: pointer; font: var(--tb-font-weight-strong) var(--tb-type-control-size)/1.2 var(--tb-font-family-body); padding: var(--tb-space-2) var(--tb-space-4); }

.review-viewer-approval-check:is(:hover, :focus-visible) { border-color: var(--tb-color-success-border); background: var(--tb-color-surface-raised); color: var(--tb-color-success-fg); outline: var(--tb-focus-outline); }

.review-viewer-approval-check.is-approved { border-color: var(--tb-color-success-fg); background: var(--tb-color-success-bg); color: var(--tb-color-success-fg); box-shadow: 0 0 0 2px var(--tb-color-success-border), 0 3px 0 color-mix(in srgb, var(--tb-color-success-fg) 18%, transparent); }

.review-viewer-approval-check-box { display: grid; width: 1.75rem; height: 1.75rem; place-items: center; border: 2px solid var(--tb-color-border-strong); border-radius: var(--tb-radius-control); color: transparent; }

.review-viewer-approval-check.is-approved .review-viewer-approval-check-box { border-color: var(--tb-color-success-fg); color: var(--tb-color-success-bg); background: var(--tb-color-success-fg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tb-color-success-fg) 24%, transparent); }

.review-viewer-approval-check-box svg { width: 1.4rem; height: 1.4rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.6; }

.review-viewer-other-approvals { display: grid; min-width: 0; gap: var(--tb-space-1); color: var(--tb-color-text-muted); font-size: var(--tb-type-metadata-size); text-align: center; }

.client-approval-info-row[hidden] {
  display: none;
}

.client-approval-info-value { display: grid; min-width: 0; gap: var(--tb-space-1); }

.review-viewer-info-approval,
.review-viewer-info-approval-state { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--tb-space-1); }

.review-viewer-info-approval strong { color: var(--tb-color-success-fg); font-weight: var(--tb-font-weight-strong); }

.review-viewer-info-approval span,
.review-viewer-info-approval-state { color: var(--tb-color-text-muted); }

.review-viewer-info-approval-state.is-unavailable { color: var(--tb-color-warning-fg); }

.review-viewer-toolbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: flex-end; gap: var(--tb-space-2); min-height: var(--tb-density-control-height); margin: calc(-1 * var(--tb-space-2)) calc(-1 * var(--tb-space-2)) 0; padding: var(--tb-space-2); border-bottom: var(--tb-border-divider); background: color-mix(in srgb, var(--tb-color-canvas) 94%, transparent); box-shadow: 0 1px 0 color-mix(in srgb, var(--tb-color-border-default) 65%, transparent); backdrop-filter: blur(8px); }
.review-viewer-surface-toggle.is-active { color: var(--tb-color-text-secondary); }
.review-viewer-surface-toggle.is-hidden { color: var(--tb-color-text-muted); opacity: .62; }
.review-viewer-surface-toggle svg { width: 1.25rem; height: 1.25rem; }
.review-viewer-resolved-toggle svg { width: 1.45rem; height: 1.45rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.review-viewer-resolved-toggle.is-active { color: var(--tb-color-text-secondary); }
.review-viewer-resolved-toggle.is-active .review-viewer-resolution-circle { fill: currentColor; stroke: currentColor; }
.review-viewer-resolved-toggle.is-active .review-viewer-resolution-check { stroke: var(--tb-color-surface); }
.review-viewer-resolved-toggle.is-hidden { color: var(--tb-color-text-muted); }
.review-viewer-resolved-toggle.is-hidden .review-viewer-resolution-circle { fill: none; stroke: currentColor; }
.review-viewer-resolved-toggle.is-hidden .review-viewer-resolution-check { stroke: currentColor; }
.review-viewer-resolved-toggle:disabled,
.review-viewer-resolved-toggle:disabled:is(:hover, :focus-visible) { cursor: not-allowed; opacity: .55; border-color: transparent; background: transparent; color: var(--tb-color-text-muted); outline: 0; }

.review-viewer-filter-wrap { position: relative; }
.review-viewer-filter-wrap:has([data-review-filter-popover]:not([hidden])) > .review-viewer-filter-toggle[data-tooltip]::after { opacity: 0; }
.review-viewer-filter-popover { position: absolute; inset-inline: auto calc(-1 * (1.75rem + var(--tb-space-2))); top: calc(100% + var(--tb-space-2)); z-index: 70; display: grid; box-sizing: border-box; width: min(23.75rem, calc(100vw - (var(--tb-space-4) * 2))); gap: var(--tb-space-3); padding: var(--tb-space-4); border: var(--tb-border-strong); border-radius: var(--tb-radius-control); background: var(--tb-color-surface); box-shadow: 0 14px 38px rgb(0 0 0 / 18%); }
.review-viewer-filter-popover[hidden] { display: none; }
.review-viewer-filter-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--tb-space-2); padding: 0 0 var(--tb-space-2); border-bottom: var(--tb-border-divider); color: var(--tb-color-text-primary); font-family: var(--tb-font-family-mono); font-size: 10px; font-weight: var(--tb-font-weight-regular); letter-spacing: 1px; text-transform: uppercase; }
.review-viewer-filter-close { display: grid; place-items: center; width: 2rem; height: 2rem; padding: 0; border: var(--tb-border-boundary); border-radius: var(--tb-radius-control); background: var(--tb-color-surface); color: var(--tb-color-text-muted); cursor: pointer; }
.review-viewer-filter-close:is(:hover, :focus-visible) { border-color: var(--tb-color-accent); background: var(--tb-color-interaction-hover); color: var(--tb-color-text-link); outline: var(--tb-focus-outline); outline-offset: var(--tb-focus-outline-offset); }
.review-viewer-filter-close svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.review-viewer-filter-all { width: 100%; min-height: 2.75rem; padding: 0 var(--tb-space-4); border: var(--tb-border-selected); border-radius: var(--tb-radius-control); background: color-mix(in srgb, var(--tb-color-accent) 12%, var(--tb-color-surface)); color: var(--tb-color-text-primary); cursor: pointer; font-family: var(--tb-font-family-mono); font-size: 10.5px; font-weight: var(--tb-font-weight-regular); letter-spacing: .2px; text-transform: none; }
.review-viewer-filter-all:is(:hover, :focus-visible),
.review-viewer-filter-all.is-selected { border-color: var(--tb-color-accent); background: color-mix(in srgb, var(--tb-color-accent) 18%, var(--tb-color-surface)); color: var(--tb-color-text-primary); outline: var(--tb-focus-outline); outline-offset: var(--tb-focus-outline-offset); }
.review-viewer-filter-fields { display: grid; gap: var(--tb-space-2); }
.review-viewer-filter-field { display: grid; gap: var(--tb-space-1); min-width: 0; }
.review-viewer-filter-label { color: var(--tb-color-text-muted); font-family: var(--tb-font-family-mono); font-size: 10px; font-weight: var(--tb-font-weight-regular); letter-spacing: 1.5px; text-transform: uppercase; }
.review-viewer-filter-select { position: relative; min-width: 0; }
.review-viewer-filter-select > summary { display: flex; align-items: center; justify-content: space-between; gap: var(--tb-space-2); min-height: var(--tb-density-control-height); padding: 0 var(--tb-space-4); border: var(--tb-border-boundary); border-radius: var(--tb-radius-control); background: var(--tb-color-surface-sunken); color: var(--tb-color-text-primary); cursor: pointer; font-family: var(--tb-font-family-mono); font-size: 10.5px; font-weight: var(--tb-font-weight-regular); letter-spacing: .2px; list-style: none; }
.review-viewer-filter-select > summary::-webkit-details-marker { display: none; }
.review-viewer-filter-select > summary:is(:hover, :focus-visible),
.review-viewer-filter-select[open] > summary { border-color: var(--tb-color-accent); background: var(--tb-color-surface); color: var(--tb-color-text-link); outline: var(--tb-focus-outline); outline-offset: var(--tb-focus-outline-offset); }
.review-viewer-filter-select > summary > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.review-viewer-filter-select > summary svg { width: 1rem; height: 1rem; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.review-viewer-filter-menu { position: absolute; inset-inline: 0; top: calc(100% + var(--tb-space-1)); z-index: 21; display: grid; max-height: 14rem; overflow: auto; padding: var(--tb-space-1); border: var(--tb-border-divider); border-radius: var(--tb-radius-control); background: var(--tb-popover-background); box-shadow: var(--tb-popover-shadow); }
.review-viewer-filter-option { display: grid; grid-template-columns: 1.25rem minmax(0, 1fr); align-items: center; gap: var(--tb-space-1); min-height: var(--tb-density-control-height); padding: 0 var(--tb-space-4); border: var(--tb-border-width-default) solid transparent; border-radius: var(--tb-radius-control); background: transparent; color: var(--tb-color-text-primary); cursor: pointer; font-family: var(--tb-font-family-mono); font-size: 10.5px; font-weight: var(--tb-font-weight-regular); letter-spacing: .2px; text-align: left; }
.review-viewer-filter-option:is(:hover, :focus-visible),
.review-viewer-filter-option.is-selected { border-color: var(--tb-color-accent); background: var(--tb-color-interaction-hover); color: var(--tb-color-text-link); outline: var(--tb-focus-outline); outline-offset: var(--tb-focus-outline-offset); }
.review-viewer-filter-option-check { color: var(--tb-color-accent); font-weight: var(--tb-font-weight-strong); text-align: center; }

.review-viewer-comment-count { display: inline-flex; align-items: center; justify-content: center; min-width: 1.75rem; min-height: var(--tb-density-control-height); margin: 0; padding: 0 var(--tb-space-1); border: var(--tb-border-divider); border-radius: var(--tb-radius-control); background: var(--tb-color-surface-raised); color: var(--tb-color-text-muted); font-family: var(--tb-font-family-mono); font-size: var(--tb-type-metadata-size); }

.review-viewer-send { display: inline-flex; align-items: center; justify-content: center; gap: var(--tb-space-1); min-height: var(--tb-density-control-height); border: var(--tb-border-width-default) solid var(--tb-color-accent); border-radius: var(--tb-button-radius); background: var(--tb-color-accent); color: var(--tb-color-accent-contrast); cursor: pointer; font: inherit; font-size: var(--tb-type-metadata-size); font-weight: var(--tb-font-weight-strong); padding: 0 var(--tb-space-3); }

.review-viewer-send:hover,
.review-viewer-send:focus-visible { border-color: var(--tb-color-accent-hover); background: var(--tb-color-accent-hover); outline: var(--tb-focus-outline); outline-offset: var(--tb-focus-outline-offset); }

.review-viewer-send svg,
.review-viewer-visibility svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.review-viewer-reply summary {
  color: var(--tb-color-text-link);
  cursor: pointer;
  font-family: var(--tb-font-family-mono);
  font-size: var(--tb-type-metadata-size);
  font-weight: var(--tb-font-weight-strong);
}

.review-viewer-thread-list {
  display: grid;
  gap: var(--tb-space-2);
}

.review-viewer-empty-thread {
  display: grid;
  min-height: 5rem;
  margin: 0;
  padding: var(--tb-space-4);
  place-items: center;
  border: 1px dotted var(--tb-color-border-default);
  border-radius: var(--tb-panel-radius);
  color: var(--tb-color-text-secondary);
  text-align: center;
}

.review-viewer-load-older {
  justify-self: center;
  min-height: var(--tb-density-control-height);
  padding: 0 var(--tb-space-3);
  border: var(--tb-border-boundary);
  border-radius: var(--tb-button-radius);
  background: var(--tb-color-surface);
  color: var(--tb-color-text-link);
  cursor: pointer;
  font: var(--tb-font-weight-strong) var(--tb-type-metadata-size)/1 var(--tb-font-family-mono);
}

.review-viewer-load-older:is(:hover, :focus-visible) {
  border-color: var(--tb-color-accent);
  background: var(--tb-color-interaction-hover);
  outline: var(--tb-focus-outline);
  outline-offset: var(--tb-focus-outline-offset);
}

.review-viewer-thread { display: grid; gap: 0; padding: var(--tb-space-2); border: var(--tb-border-divider); border-radius: var(--tb-panel-radius); background: var(--tb-color-surface); box-shadow: var(--tb-shadow-resting); }
.review-viewer-approval-feed-item.is-landing-unread { box-shadow: inset .18rem 0 0 var(--tb-color-character-accent); }
.review-markup-control.is-landing-unread { outline: .2rem solid var(--tb-color-character-accent); outline-offset: .15rem; }

.review-viewer-approval-feed-item { display: flex; align-items: center; gap: var(--tb-space-3); padding: var(--tb-space-3); border: var(--tb-border-divider); border-radius: var(--tb-panel-radius); background: var(--tb-color-success-bg); color: var(--tb-color-text-primary); }
.review-viewer-approval-feed-item p { margin: 0; line-height: 1.4; }
.review-viewer-approval-feed-item strong { color: var(--tb-color-text-primary); }

.review-viewer-item { display: grid; gap: var(--tb-space-2); padding: var(--tb-space-2); border: 0; border-radius: var(--tb-radius-control); background: transparent; position: relative; }

.review-viewer-item.is-withdrawn,
.review-viewer-item.is-redacted { background: var(--tb-color-readonly); }

.review-viewer-item.is-reply { border: var(--tb-border-divider); background: var(--tb-color-surface-raised); }

.review-viewer-item.is-reply p { margin-inline: var(--tb-space-2); }

.review-viewer-item + .review-viewer-item { border-block-start: var(--tb-border-divider); }

.review-viewer-item-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--tb-space-2); min-width: 0; }

.review-viewer-author {
  display: flex; min-width: 0; align-items: center; gap: var(--tb-space-2);
}

.review-viewer-avatar {
  display: grid; flex: 0 0 auto; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--tb-color-accent); color: var(--tb-color-accent-contrast) !important; font-family: var(--tb-font-family-mono); font-size: var(--tb-type-metadata-size); font-weight: var(--tb-font-weight-strong);
}

.review-viewer-avatar.tone-1 { background: var(--tb-color-character-accent); color: var(--tb-color-text-primary) !important; }
.review-viewer-avatar.tone-2 { background: var(--tb-color-info-border); color: var(--tb-color-text-inverse) !important; }
.review-viewer-avatar.tone-3 { background: var(--tb-color-success-border); color: var(--tb-color-text-inverse) !important; }

.review-viewer-item-meta {
  display: flex; flex-wrap: wrap; align-items: baseline; min-width: 0; margin-inline-start: calc(var(--tb-space-1) * 2); gap: 0 var(--tb-space-3);
}

.review-viewer-item-meta strong { overflow: hidden; color: var(--tb-color-text-primary); font-size: var(--tb-type-body-size); text-overflow: ellipsis; white-space: nowrap; }

.review-viewer-item-meta span {
  color: var(--tb-color-text-muted) !important;
  font-size: var(--tb-type-metadata-size);
}

.review-viewer-date[data-tooltip] { position: relative; cursor: help; }
.review-viewer-date[data-tooltip]::after { position: absolute; inset-block-start: calc(100% + var(--tb-space-1)); inset-inline-start: 0; z-index: var(--tb-popover-layer); width: max-content; padding: var(--tb-space-1) var(--tb-space-2); border: var(--tb-border-divider); border-radius: var(--tb-radius-control); background: var(--tb-popover-background); box-shadow: var(--tb-popover-shadow); color: var(--tb-color-text-primary); content: attr(data-tooltip); font-family: var(--tb-font-family-body); font-size: var(--tb-type-metadata-size); font-weight: var(--tb-font-weight-regular); line-height: 1.25; opacity: 0; pointer-events: none; white-space: nowrap; }
.review-viewer-date[data-tooltip]:is(:hover, :focus-visible)::after { opacity: 1; }

.review-viewer-visibility[data-tooltip]::after {
  position: absolute; inset-block-start: calc(100% + var(--tb-space-2)); inset-inline-end: 0; z-index: var(--tb-popover-layer); width: max-content; max-width: 16rem; padding: var(--tb-space-1) var(--tb-space-2); border: var(--tb-border-divider); border-radius: var(--tb-radius-control); background: var(--tb-popover-background); box-shadow: var(--tb-popover-shadow); color: var(--tb-color-text-primary); content: attr(data-tooltip); font-family: var(--tb-font-family-body); font-size: var(--tb-type-metadata-size); font-weight: var(--tb-font-weight-regular); line-height: 1.25; opacity: 0; pointer-events: none; text-align: left; text-transform: none; white-space: nowrap;
}

.review-viewer-visibility[data-tooltip]:is(:hover, :focus-visible)::after {
  opacity: 1;
}

.review-viewer-item-header-actions button[data-tooltip]::after {
  inset-block-start: 50%;
  inset-inline-start: auto;
  inset-inline-end: calc(100% + var(--tb-space-2));
  max-width: min(16rem, calc(100vw - (var(--tb-space-4) * 2)));
  transform: translateY(-50%);
  white-space: normal;
}

.review-viewer-item-header-actions button[data-tooltip]::after { opacity: 0; }
.review-viewer-item-header-actions button[data-tooltip]:is(:hover, :focus-visible)::after { opacity: 1; }

.review-viewer-item-header-actions {
  display: flex; align-items: center; gap: var(--tb-space-1); flex: 0 0 auto;
  margin-block-start: calc(-1 * var(--tb-space-1));
  margin-inline-end: calc(-1 * var(--tb-space-2));
}

.review-viewer-item-footer-actions { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--tb-space-1); width: 100%; min-height: var(--tb-icon-button-size); margin-top: var(--tb-space-1); }
.review-viewer-item-footer-actions .review-viewer-visibility { position: static; display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 1.25rem; height: 1.25rem; color: var(--tb-color-text-muted); transform: none; }
.review-viewer-item-footer-actions .review-viewer-visibility[data-tooltip]::after { inset-block-start: auto; inset-block-end: calc(100% + var(--tb-space-2)); inset-inline-end: 0; transform: none; white-space: normal; }

.review-viewer-resolution { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; min-height: 2.5rem; margin-inline-end: calc(var(--tb-space-1) * -0.25); border: 0; border-radius: 50%; background: transparent; color: var(--tb-color-border-default); }
.review-viewer-resolution-readonly { cursor: default; }
.review-viewer-resolution-readonly:is(:hover, :focus-visible) { background: transparent; outline: 0; }
.review-viewer-resolution-readonly:not(.is-resolved):is(:hover, :focus-visible) { color: var(--tb-color-border-default); }
.review-viewer-resolution-readonly .review-viewer-resolution-check { opacity: 0; }
.review-viewer-resolution.is-resolved { background: transparent; color: var(--tb-color-success-border); }
button.review-viewer-icon-action.review-viewer-resolution { width: 2.5rem; height: 2.5rem; min-height: 2.5rem; border: 0; border-radius: 50%; background: transparent; color: var(--tb-color-text-muted); }
button.review-viewer-icon-action.review-viewer-resolution:is(:hover, :focus-visible) { border-color: transparent; background: transparent; color: var(--tb-color-text-link); outline: var(--tb-focus-outline); outline-offset: var(--tb-focus-outline-offset); }
button.review-viewer-icon-action.review-viewer-resolution.is-resolved,
button.review-viewer-icon-action.review-viewer-resolution.is-resolved:is(:hover, :focus-visible) { border-color: transparent; background: transparent; color: var(--tb-color-success-border); }
.review-viewer-resolution svg { width: 1.6rem; height: 1.6rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
button.review-viewer-icon-action.review-viewer-resolution svg { width: 1.6rem; height: 1.6rem; }
.review-viewer-resolution-circle.is-filled { fill: var(--tb-color-success-border); stroke: var(--tb-color-success-border); }
.review-viewer-resolution.is-resolved .review-viewer-resolution-check { stroke: var(--tb-color-text-inverse); }
.review-viewer-resolution-check { opacity: 0; transition: opacity var(--tb-motion-fast); }
.review-viewer-resolution-check.is-visible,
.review-viewer-resolution:is(:hover, :focus-visible) .review-viewer-resolution-check { opacity: 1; }
.review-viewer-resolution-readonly:not(.is-resolved):is(:hover, :focus-visible) .review-viewer-resolution-check { opacity: 0; }
button.review-viewer-icon-action.review-viewer-resolution.is-resolved:is(:hover, :focus-visible) { outline: var(--tb-focus-outline); outline-offset: 3px; }
button.review-viewer-icon-action.review-viewer-resolution.is-resolved:is(:hover, :focus-visible) .review-viewer-resolution-check { opacity: 0; }
button.review-viewer-icon-action.review-viewer-resolution.is-resolved:is(:hover, :focus-visible) .review-viewer-resolution-circle.is-filled { fill: none; stroke: currentColor; }

.review-viewer-icon-action {
  display: grid; place-items: center; width: var(--tb-icon-button-size); height: var(--tb-icon-button-size); min-height: var(--tb-icon-button-size); padding: 0; border: var(--tb-border-width-default) solid transparent; border-radius: var(--tb-button-radius); background: transparent; color: var(--tb-color-text-muted); cursor: pointer; font: inherit; text-decoration: none;
}

.review-viewer-icon-action svg {
  width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8;
}

.review-viewer-icon-action:is(:hover, :focus-visible),
.review-viewer-action-details[open] > .review-viewer-icon-action { border-color: var(--tb-color-accent); background: var(--tb-color-interaction-hover); color: var(--tb-color-text-link); outline: var(--tb-focus-outline); outline-offset: var(--tb-focus-outline-offset); }

.review-viewer-action-details { position: relative; }

.review-viewer-action-details > summary { list-style: none; }

.review-viewer-action-details > summary::-webkit-details-marker { display: none; }

.review-viewer-action-details > form { position: absolute; z-index: 3; top: calc(100% + var(--tb-space-2)); inset-inline-end: 0; width: min(19rem, calc(100vw - (var(--tb-space-4) * 2))); margin: 0; box-shadow: var(--tb-shadow-raised); }

.review-viewer-reply > form { position: static; width: 100%; max-width: none; box-sizing: border-box; margin: var(--tb-space-2) 0 0; box-shadow: none; }

.review-viewer-reply > summary[data-tooltip] { position: relative; }
.review-viewer-reply > summary[data-tooltip]::after {
  position: absolute;
  inset-block-start: calc(100% + var(--tb-space-2));
  inset-inline-start: auto;
  inset-inline-end: 0;
  z-index: var(--tb-popover-layer);
  width: max-content;
  max-width: min(16rem, calc(100vw - (var(--tb-space-4) * 2)));
  padding: var(--tb-space-1) var(--tb-space-2);
  border: var(--tb-border-divider);
  border-radius: var(--tb-radius-control);
  background: var(--tb-popover-background);
  box-shadow: var(--tb-popover-shadow);
  color: var(--tb-color-text-primary);
  content: attr(data-tooltip);
  font-family: var(--tb-font-family-body);
  font-size: var(--tb-type-metadata-size);
  font-weight: var(--tb-font-weight-regular);
  line-height: 1.25;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  white-space: normal;
}
.review-viewer-reply > summary[data-tooltip]:is(:hover, :focus-visible)::after { opacity: 1; }

.review-viewer-action-menu {
  position: relative;
}

.review-viewer-action-menu-popover { position: absolute; top: calc(100% + var(--tb-space-2)); inset-inline-end: 0; z-index: 4; display: grid; width: max-content; min-width: 0; padding: var(--tb-space-1); border: var(--tb-border-divider); border-radius: var(--tb-radius-control); background: var(--tb-popover-background); box-shadow: var(--tb-popover-shadow); }

.review-viewer-menu-item { display: flex; align-items: center; min-height: 2rem; width: 2rem; border: var(--tb-border-width-default) solid transparent; border-radius: var(--tb-radius-control); background: transparent; color: var(--tb-color-text-primary); cursor: pointer; font: inherit; padding: 0; justify-content: center; text-align: center; }

.review-viewer-menu-item:is(:hover, :focus-visible) { border-color: var(--tb-color-accent); background: var(--tb-color-interaction-hover); color: var(--tb-color-text-link); outline: var(--tb-focus-outline); outline-offset: var(--tb-focus-outline-offset); }

.review-viewer-menu-item svg { width: 1rem; height: 1rem; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }

.review-viewer-menu-edit > summary { list-style: none; }

.review-viewer-menu-edit > summary::-webkit-details-marker { display: none; }

.review-viewer-menu-edit > form { position: static; width: min(19rem, calc(100vw - (var(--tb-space-4) * 2))); margin: var(--tb-space-2) 0 0; box-shadow: none; }

.review-viewer-reply {
  margin: 0;
}

.review-viewer-item-body { min-width: 0; }
.review-viewer-item p { margin: var(--tb-space-1) var(--tb-space-2) 0; overflow-wrap: anywhere; color: var(--tb-color-text-primary); line-height: 1.45; white-space: pre-wrap; }
.review-viewer-inline-edit-field { display: block !important; margin: var(--tb-space-1) var(--tb-space-2) 0; }
.review-viewer-inline-edit-field textarea { min-height: 3.5rem; width: 100%; background: var(--tb-color-surface-sunken); color: var(--tb-color-text-primary); font-family: var(--tb-font-family-body); font-size: var(--tb-type-control-size); letter-spacing: normal; text-transform: none; resize: vertical; }
.review-viewer-item-footer-actions > .review-viewer-reply { display: inline-flex; order: 1; justify-items: end; width: auto; margin: 0; }
.review-viewer-item-footer-actions > .review-viewer-reply[open] { display: block; order: 3; flex: 0 0 100%; width: 100%; }
.review-viewer-item-footer-actions > .review-viewer-reply > summary.review-viewer-icon-action { display: grid; place-items: center; justify-self: auto; }
.review-viewer-item-footer-actions > .review-viewer-reply[open] > summary.review-viewer-icon-action { margin-inline-start: auto; }
.review-viewer-item-footer-actions > .review-viewer-reply > form { width: 100%; }
.review-viewer-item-footer-actions > .review-viewer-reply[open] > form { display: grid; width: 100% !important; min-width: 0 !important; max-width: none !important; }
.review-viewer-item-footer-actions > .review-viewer-action-menu { display: inline-flex; order: 2; flex: 0 0 auto; }

.review-viewer-inline-edit-actions { display: inline-flex; align-items: center; gap: var(--tb-space-1); }
.review-viewer-inline-edit-actions .review-viewer-icon-action { width: 2rem; height: 2rem; min-height: 2rem; }
.review-viewer-inline-edit-actions .review-viewer-edit-delete { color: var(--tb-color-error-fg); }
.review-viewer-inline-edit-actions .review-viewer-edit-delete:is(:hover, :focus-visible) { border-color: var(--tb-color-error-border); background: var(--tb-color-error-bg); color: var(--tb-color-error-fg); }
.review-viewer-inline-edit-actions .review-viewer-edit-save { color: var(--tb-color-accent); }
.review-viewer-inline-edit-actions .review-viewer-edit-cancel { width: 1.75rem; height: 1.75rem; min-height: 1.75rem; color: var(--tb-color-text-muted); }
.review-viewer-inline-edit-actions .review-viewer-edit-cancel svg { width: .85rem; height: .85rem; }

.review-viewer-composer { gap: var(--tb-space-2); padding: var(--tb-space-2); border: var(--tb-border-divider); border-radius: var(--tb-panel-radius); background: var(--tb-color-surface); }

.review-viewer-composer > label,
.review-viewer-reply-form > label { display: block; padding: 0; color: inherit; font: inherit; letter-spacing: normal; text-transform: none; }

.review-viewer-form textarea { min-height: 3.5rem; border-color: var(--tb-color-border-default); background: var(--tb-color-surface-sunken); line-height: 1.4; max-height: 50vh; overflow-y: hidden; resize: none; }

.review-viewer-form textarea:focus { border-color: var(--tb-color-accent); outline: var(--tb-focus-outline); outline-offset: var(--tb-focus-outline-offset); }

.review-viewer-composer-actions { display: flex; align-items: center; justify-content: space-between; gap: var(--tb-space-2); }
.review-viewer-composer-action-group { display: inline-flex; align-items: center; justify-content: flex-end; gap: var(--tb-space-2); margin-inline-start: auto; }
.review-viewer-composer-actions button[data-tooltip]::after {
  inset-block-start: auto;
  inset-block-end: calc(100% + var(--tb-space-2));
  max-width: min(16rem, calc(100vw - (var(--tb-space-4) * 2)));
  white-space: normal;
}

.review-viewer-form .review-viewer-visibility-toggle { display:inline-flex;align-items:center; min-height:var(--tb-density-control-height); border:0;border-radius:var(--tb-button-radius); background:transparent; color:var(--tb-color-text-muted); cursor:pointer; padding:0; }
.review-viewer-form .review-viewer-visibility-toggle:is(:hover, :focus-visible) { background:var(--tb-color-interaction-hover);color:var(--tb-color-text-link); outline:var(--tb-focus-outline);outline-offset:var(--tb-focus-outline-offset); }
.review-viewer-form .review-viewer-visibility-toggle.is-shared { color:var(--tb-color-text-link); }
.review-viewer-switch { display: inline-flex; width: 2.2rem; height: 1.35rem; align-items: center; justify-content: center; border: 1px solid currentColor; border-radius: 999px; background: var(--tb-color-surface); }
.review-viewer-switch svg { width:.85rem; height:.85rem; fill:none; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round; stroke-width:1.8; }

.review-viewer-icon-action[data-tooltip]::after { inset-inline-start: auto; inset-inline-end: 0; transform: none; }
.review-viewer-form .review-viewer-visibility-toggle[data-tooltip]::after {
  max-width: min(16rem, calc(100vw - (var(--tb-space-4) * 2)));
  white-space: normal;
}
.review-viewer-muted {
  color: var(--tb-color-text-muted);
  font-size: var(--tb-type-metadata-size);
}

.review-viewer-send {
  margin-inline-start: auto;
}

.review-viewer-form .review-viewer-send:is(:hover, :focus-visible) { border-color: var(--tb-color-accent-hover); background: var(--tb-color-accent-hover); color: var(--tb-color-accent-contrast); }

.review-viewer-reply-form { margin-top: var(--tb-space-2); padding: var(--tb-space-2); border: var(--tb-border-divider); background: var(--tb-color-surface-sunken); }

/* Reply composers stay inline and span the complete review item for every root type. */
.review-viewer-item-footer-actions > .review-viewer-reply { position: static; inset: auto; display: inline-flex; justify-items: stretch; width: auto; min-width: 0; margin: 0; }
.review-viewer-item-footer-actions > .review-viewer-reply > summary.review-viewer-icon-action { justify-self: auto; }
.review-viewer-item-footer-actions > .review-viewer-reply > form { position: static; width: 100%; max-width: none; min-width: 0; box-sizing: border-box; margin: var(--tb-space-2) 0 0; box-shadow: none; }

.review-viewer-message { display: flex; align-items: center; justify-content: space-between; gap: var(--tb-space-2); padding: var(--tb-space-2) var(--tb-space-3); }

.review-viewer-message button { flex: 0 0 auto; border-color: var(--tb-color-accent); color: var(--tb-color-text-link); }

.review-viewer-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@media (max-width: 40rem) {
  .review-viewer-content { padding: var(--tb-space-1); }
  .review-viewer-status-dock { padding-inline: var(--tb-space-2); }
  .review-viewer-toolbar { align-items: flex-start; }
  .review-viewer-replies-toggle { margin-inline-start: 0; }
  .review-viewer-replies { margin-inline-start: 0; }
  .review-viewer-item p,
  .review-viewer-reply { margin-inline-start: 0; }
  .review-viewer-composer-actions { justify-content: space-between; flex-wrap: nowrap; }
  .review-viewer-send { width: auto; }
}

/* Preserve semantic green approval/status cues when the Viewer is otherwise monochrome. */
[data-tb-theme="black-white"] #infoPanel .status,
[data-tb-theme="black-white"] #infoPanel .status .dot { color: rgb(22 101 52); background: rgb(22 101 52); }
[data-tb-theme="black-white"] #infoPanel .status .dot { box-shadow: 0 0 0 3px rgb(22 101 52 / 16%); }
[data-tb-theme="black-white"] #infoPanel .review-viewer-info-approval strong { color: rgb(22 101 52); }
[data-tb-theme="black-white"] #reviewApprovalMount .review-viewer-approval-check.is-approved { border-color: rgb(88 168 117); background: rgb(234 247 239); color: rgb(22 101 52); }
[data-tb-theme="black-white"] #reviewApprovalMount .review-viewer-approval-check.is-approved .review-viewer-approval-check-box { border-color: rgb(22 101 52); color: rgb(234 247 239); background: rgb(22 101 52); box-shadow: 0 0 0 3px rgb(22 101 52 / 24%); }

/* Sticky Note render overrides follow the legacy markup rules above. */
.review-markup-sticky { min-width: 0; max-width: none; min-height: 0; padding: 0; border: 0; border-radius: .14rem; background: var(--review-sticky-background, #fff); box-shadow: 0 .3rem .7rem rgb(0 0 0 / 26%); opacity: 1; overflow: hidden; transform: rotate(var(--review-sticky-rotation, 0deg)); transform-origin: center; }
.review-markup-sticky:is(:hover, :focus-visible), .review-markup-sticky.is-associated { opacity: 1; box-shadow: 0 .38rem .85rem rgb(0 0 0 / 32%); }
.review-markup-sticky.is-selected { outline: .16rem solid var(--tb-color-accent); outline-offset: .14rem; }
.review-markup-control.review-markup-sticky.is-selected { z-index: 3; transform: rotate(var(--review-sticky-rotation, 0deg)) scale(1.18); }
.review-markup-sticky-paper { display: block; width: 100%; height: 100%; }
.review-markup-sticky-paper svg { display: block; width: 100%; height: 100%; overflow: visible; }
.review-markup-sticky-paper polyline { fill: none; stroke: #111820; stroke-linecap: round; stroke-linejoin: round; stroke-width: .7; vector-effect: none; }

.review-viewer-toolbar-status {
  align-items: center;
  display: flex;
  gap: .55rem;
}

.review-viewer-unread-envelope {
  align-items: center;
  color: #e66b2f;
  display: inline-flex;
  flex: 0 0 1.25rem;
  height: 1.25rem;
  justify-content: center;
  width: 1.25rem;
}

.review-viewer-unread-envelope svg {
  display: block;
  height: 1rem;
  width: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

@media (prefers-reduced-motion: reduce) {
  .review-viewer-thread,
  .review-viewer-item {
    transition: none !important;
  }
}

@media (forced-colors: active) {
  .review-viewer-unread-envelope {
    color: Highlight;
  }
}

/* Self-authored resolution is intentionally read-only, but its state still
   gets the same immediate tooltip treatment as actionable resolution. */
.review-viewer-item-header-actions .review-viewer-resolution[data-tooltip] {
  position: relative;
}
.review-viewer-item-header-actions .review-viewer-resolution[data-tooltip]::after {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: auto;
  inset-inline-end: calc(100% + var(--tb-space-2));
  z-index: var(--tb-popover-layer);
  width: max-content;
  max-width: min(16rem, calc(100vw - (var(--tb-space-4) * 2)));
  padding: var(--tb-space-1) var(--tb-space-2);
  border: var(--tb-border-divider);
  border-radius: var(--tb-radius-control);
  background: var(--tb-popover-background);
  box-shadow: var(--tb-popover-shadow);
  color: var(--tb-color-text-primary);
  content: attr(data-tooltip);
  font-family: var(--tb-font-family-body);
  font-size: var(--tb-type-metadata-size);
  font-weight: var(--tb-font-weight-regular);
  line-height: 1.25;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  white-space: normal;
  transform: translateY(-50%);
}
.review-viewer-item-header-actions .review-viewer-resolution[data-tooltip]:hover::after {
  opacity: 1;
}

/* Sticky Notes are physically square. Their normalized width and height are
   intentionally different on a non-square contained canvas, so presentation
   uses one width plus aspect-ratio instead of stretching each axis. */
.review-markup-sticky {
  width: auto;
  height: auto;
  aspect-ratio: 1 / 1;
}

/* CM3 Sticky Note caption and compact composer/feed refinements. */
.review-viewer-item-heading { align-items: flex-start; }
.review-viewer-item-header-actions { align-self: flex-start; }
.review-viewer-composer-shell { min-height: 11rem; grid-template-rows: auto minmax(0, 1fr); }
.review-viewer-composer-mode { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; }
.review-viewer-composer-mode-icon { width: 1rem; height: 1rem; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.review-viewer-sticky-composer-tools { display: grid; grid-template-columns: 10.5rem minmax(0, 1fr) auto; align-items: center; gap: var(--tb-space-3); min-height: 8rem; }
.review-viewer-sticky-composer-tools .review-viewer-sticky-palette { display: grid; grid-template-columns: repeat(3, 3rem); grid-template-rows: repeat(2, 3rem); align-content: center; gap: var(--tb-space-2); }
.review-viewer-sticky-composer-tools .review-viewer-sticky-color,
.review-viewer-form .review-viewer-sticky-composer-tools .review-viewer-sticky-color { width: 3rem; min-width: 3rem; height: 3rem; min-height: 3rem; max-height: 3rem; padding: .2rem; }
.review-viewer-sticky-help { min-height: 6.75rem; width: 100%; height: 100%; box-sizing: border-box; display: flex; align-items: center; justify-content: center; margin: 0; padding: var(--tb-space-3); border: var(--tb-border-divider); border-radius: var(--tb-radius-control); background: var(--tb-color-surface-sunken); color: var(--tb-color-text-secondary); font-size: var(--tb-type-metadata-size); line-height: 1.35; text-align: center; }
.review-viewer-sticky-composer-tools .review-viewer-sticky-cancel { align-self: start; margin: 0; }
.review-sticky-editor-caption { display: grid; gap: var(--tb-space-1); color: var(--tb-color-text-primary); font-size: var(--tb-type-metadata-size); }
.review-sticky-editor-caption-optional { color: var(--tb-color-text-muted); font-weight: var(--tb-font-weight-regular); }
.review-sticky-editor-caption input { width: 100%; box-sizing: border-box; min-height: var(--tb-density-control-height); border: var(--tb-border-boundary); border-radius: var(--tb-radius-control); background: var(--tb-color-surface-sunken); color: var(--tb-color-text-primary); font: inherit; padding: 0 var(--tb-space-2); }
.review-sticky-editor-caption input:focus { border-color: var(--tb-color-accent); outline: var(--tb-focus-outline); outline-offset: var(--tb-focus-outline-offset); }

@media (max-width: 40rem) {
  .review-viewer-sticky-composer-tools { grid-template-columns: 9.5rem minmax(0, 1fr) auto; gap: var(--tb-space-2); }
  .review-viewer-sticky-composer-tools .review-viewer-sticky-palette { grid-template-columns: repeat(3, 2.75rem); grid-template-rows: repeat(2, 2.75rem); gap: var(--tb-space-1); }
  .review-viewer-sticky-composer-tools .review-viewer-sticky-color,
  .review-viewer-form .review-viewer-sticky-composer-tools .review-viewer-sticky-color { width: 2.75rem; min-width: 2.75rem; height: 2.75rem; min-height: 2.75rem; max-height: 2.75rem; }
}

/* CM3 Sticky Note inspection and compact feed treatment. */
.review-viewer-sticky-palette { gap: var(--tb-space-2); }
.review-viewer-item.is-sticky-note { gap: var(--tb-space-1); }
.review-viewer-item.is-sticky-note .review-viewer-author { gap: var(--tb-space-3); }
.review-viewer-sticky-thumbnail { cursor: pointer; font: inherit; }
.review-viewer-sticky-thumbnail:is(:hover, :focus-visible) { border-color: var(--tb-color-accent); box-shadow: 0 .28rem .58rem rgb(0 0 0 / 24%); outline: var(--tb-focus-outline); outline-offset: var(--tb-focus-outline-offset); }

body.is-review-sticky-viewing { overflow: hidden; }
.review-sticky-viewer-backdrop { position: fixed; inset: 0; z-index: 210; display: grid; place-items: center; padding: clamp(.75rem, 4vw, 3rem); background: rgb(17 24 32 / 58%); cursor: zoom-out; }
.review-sticky-viewer { position: relative; display: grid; place-items: center; width: min(82vw, 48rem); max-height: 94vh; padding: 2.75rem 1rem 1rem; box-sizing: border-box; cursor: default; }
.review-sticky-viewer-close { position: absolute; inset-block-start: 0; inset-inline-end: 0; z-index: 2; border-color: var(--tb-color-border-default); background: var(--tb-color-surface); color: var(--tb-color-text-muted); }
.review-sticky-viewer-close:is(:hover, :focus-visible) { border-color: var(--tb-color-accent); background: var(--tb-color-interaction-hover); color: var(--tb-color-text-link); }
.review-sticky-viewer-paper { display: grid; grid-template-rows: minmax(0, 1fr) auto; width: min(72vw, 72vh, 38rem); aspect-ratio: 1; box-sizing: border-box; padding: clamp(.75rem, 2vw, 1.25rem); border-radius: .2rem; background: var(--review-sticky-viewer-background, #fff); box-shadow: 0 1rem 2.5rem rgb(0 0 0 / 34%); transform: rotate(var(--review-sticky-viewer-rotation, 0deg)); transform-origin: center; }
.review-sticky-viewer-paper-ink { display: block; width: 100%; height: 100%; }
.review-sticky-viewer-paper-ink svg { display: block; width: 100%; height: 100%; overflow: visible; }
.review-sticky-viewer-paper-ink polyline { fill: none; stroke: #111820; stroke-linecap: round; stroke-linejoin: round; stroke-width: .7; vector-effect: none; }
.review-sticky-viewer-caption { margin-top: var(--tb-space-2); padding: var(--tb-space-2) var(--tb-space-1) 0; border-top: var(--tb-border-divider); color: var(--tb-color-text-primary); font-size: var(--tb-type-control-size); line-height: 1.3; text-align: center; overflow-wrap: anywhere; }

@media (max-width: 40rem) {
  .review-viewer-item.is-sticky-note .review-viewer-author { gap: var(--tb-space-2); }
  .review-sticky-viewer { width: 94vw; padding-inline: 0; }
  .review-sticky-viewer-paper { width: min(86vw, 70vh); }
}

/* CM3 drawing-backed Sticky Notes. The square stays attached to the normalized
   contained canvas; the editor itself is viewport-sized and never inherits
   artwork zoom. */
.review-viewer-sticky-palette { display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--tb-space-3); row-gap: var(--tb-space-2); }
.review-viewer-sticky-color { display: grid; place-items: center; flex: 0 0 3.25rem; width: 3.25rem; min-width: 3.25rem; height: 3.25rem; min-height: 3.25rem; max-height: 3.25rem; aspect-ratio: 1 / 1; box-sizing: border-box; padding: .25rem; border: var(--tb-border-width-default) solid var(--tb-color-border-default); border-radius: var(--tb-button-radius); background: var(--tb-color-surface); color: var(--tb-color-text-primary); cursor: pointer; font: inherit; }
.review-viewer-form .review-viewer-sticky-color { width: 3.25rem; min-width: 3.25rem; height: 3.25rem; min-height: 3.25rem; max-height: 3.25rem; padding: .25rem; }
.review-viewer-sticky-color:is(:hover, :focus-visible),
.review-viewer-sticky-color.is-selected { border-color: var(--tb-color-accent); background: var(--tb-color-interaction-hover); color: var(--tb-color-text-link); outline: var(--tb-focus-outline); outline-offset: var(--tb-focus-outline-offset); }
.review-viewer-sticky-color-swatch { display: block; width: 100%; height: 100%; border: 1px solid var(--tb-color-border-strong); border-radius: .18rem; background: var(--review-sticky-choice-color); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 42%); }
.review-viewer-sticky-cancel { display: grid; place-items: center; flex: 0 0 2.5rem; width: 2.5rem; height: 2.5rem; min-height: 2.5rem; margin-inline-start: var(--tb-space-2); padding: 0; border: var(--tb-border-width-default) solid transparent; border-radius: var(--tb-button-radius); background: transparent; color: var(--tb-color-error-fg); cursor: pointer; }
.review-viewer-form .review-viewer-sticky-cancel { width: 2.5rem; height: 2.5rem; min-height: 2.5rem; padding: 0; }
.review-viewer-sticky-cancel:hover,
.review-viewer-sticky-cancel:focus-visible { border-color: var(--tb-color-error-border); background: var(--tb-color-error-bg); outline: var(--tb-focus-outline); outline-offset: var(--tb-focus-outline-offset); }
.review-viewer-sticky-cancel svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }

.review-markup-sticky {
  min-width: 0;
  max-width: none;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: .14rem;
  background: var(--review-sticky-background, #fff);
  box-shadow: 0 .3rem .7rem rgb(0 0 0 / 26%);
  opacity: 1;
  overflow: hidden;
  transform: rotate(var(--review-sticky-rotation, 0deg));
  transform-origin: center;
}
.review-markup-sticky:is(:hover, :focus-visible),
.review-markup-sticky.is-associated { opacity: 1; box-shadow: 0 .25rem .5rem rgb(0 0 0 / 25%); }
.review-markup-sticky.is-selected { outline: .16rem solid var(--tb-color-accent); outline-offset: .14rem; }
.review-markup-sticky-paper { display: block; width: 100%; height: 100%; }
.review-markup-sticky-paper svg { display: block; width: 100%; height: 100%; overflow: visible; }
.review-markup-sticky-paper polyline { fill: none; stroke: #111820; stroke-linecap: round; stroke-linejoin: round; stroke-width: .7; vector-effect: none; }
.review-viewer-sticky-row-label { margin: var(--tb-space-1) 0 0 2.75rem !important; color: var(--tb-color-text-muted) !important; font-family: var(--tb-font-family-mono); font-size: var(--tb-type-metadata-size); letter-spacing: .04em; text-transform: uppercase; }
.review-viewer-sticky-thumbnail { display: grid; place-items: center; flex: 0 0 4rem; width: 4rem; height: 4rem; box-sizing: border-box; padding: .3rem; border: var(--tb-border-boundary); border-radius: .2rem; background: var(--review-sticky-thumbnail-background, #fff); box-shadow: 0 .22rem .45rem rgb(0 0 0 / 18%); transform: none; overflow: hidden; }
.review-viewer-sticky-thumbnail-paper { display: block; width: 100%; height: 100%; }
.review-viewer-sticky-thumbnail-paper svg { display: block; width: 100%; height: 100%; overflow: hidden; }
.review-viewer-sticky-thumbnail-paper polyline { fill: none; stroke: #111820; stroke-linecap: round; stroke-linejoin: round; stroke-width: .7; vector-effect: none; }
.review-viewer-item.is-sticky-note .review-viewer-item-body { margin-inline-start: calc(4rem + 2.25rem + (var(--tb-space-2) * 2)); }
.review-viewer-item.is-sticky-note .review-viewer-item-body > p { margin-inline-start: 0 !important; }

/* A Sticky Note root has no text body. Keep its feed card to the thumbnail
   and heading height; the reply affordance stays in the lower corner without
   reserving a second row until reply composition is actually open. */
.review-viewer-item.is-sticky-note { gap: 0; padding: var(--tb-space-1); }
.review-viewer-item.is-sticky-note > .review-viewer-item-footer-actions { position: absolute; inset-inline-end: var(--tb-space-1); inset-block-end: var(--tb-space-1); width: auto; min-height: 0; margin: 0; }
.review-viewer-item.is-sticky-note > .review-viewer-item-footer-actions > .review-viewer-reply:not([open]) { width: auto; }
.review-viewer-item.is-sticky-note > .review-viewer-item-footer-actions > .review-viewer-reply:not([open]) > summary.review-viewer-icon-action { width: 1.75rem; height: 1.75rem; min-height: 1.75rem; }
.review-viewer-item.is-sticky-note > .review-viewer-item-footer-actions:has(> .review-viewer-reply[open]) { position: static; width: 100%; min-height: var(--tb-icon-button-size); margin: var(--tb-space-1) 0 0; }

body.is-review-sticky-editing { overflow: hidden; }
.review-sticky-editor-backdrop { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: clamp(1rem, 4vw, 3rem); background: rgb(17 24 32 / 54%); }
.review-sticky-editor { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; width: min(43rem, 94vw); max-height: min(92vh, 60rem); gap: var(--tb-space-3); padding: clamp(1rem, 2.5vw, 1.5rem); border: var(--tb-border-strong); border-radius: var(--tb-panel-radius); background: var(--tb-color-surface); box-shadow: 0 1.5rem 4rem rgb(0 0 0 / 30%); }
.review-sticky-editor-header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--tb-space-3); }
.review-sticky-editor-header h2 { margin: .2rem 0 .25rem; color: var(--tb-color-text-primary); font-size: clamp(1.1rem, 2vw, 1.45rem); }
.review-sticky-editor-header p { margin: 0; color: var(--tb-color-text-secondary); font-size: var(--tb-type-metadata-size); }
.review-sticky-editor-close { flex: 0 0 auto; }
.review-sticky-editor-paper { width: min(68vw, 52vh, 34rem); aspect-ratio: 1; justify-self: center; padding: clamp(.65rem, 1.5vw, 1rem); border: var(--tb-border-boundary); border-radius: .2rem; background: color-mix(in srgb, var(--review-sticky-editor-color) 88%, var(--tb-color-surface)); box-shadow: inset 0 0 0 .08rem rgb(0 0 0 / 7%), 0 .5rem 1.2rem rgb(0 0 0 / 14%); transform: rotate(-.5deg); }
.review-sticky-editor-canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.review-sticky-editor-toolbar { display: flex; align-items: center; gap: var(--tb-space-2); }
.review-sticky-editor-toolbar-spacer { flex: 1; }
.review-sticky-editor-toolbar .review-viewer-icon-action:disabled { cursor: not-allowed; opacity: .35; }
.review-sticky-editor-toolbar .review-sticky-editor-save { color: var(--tb-color-accent); }
.review-sticky-editor-toolbar .review-sticky-editor-save:is(:hover, :focus-visible) { color: var(--tb-color-accent-hover); }

@media (max-width: 40rem) {
  .review-viewer-sticky-color { flex: 0 0 3rem; width: 3rem; min-width: 3rem; height: 3rem; min-height: 3rem; max-height: 3rem; }
  .review-viewer-form .review-viewer-sticky-color { width: 3rem; min-width: 3rem; height: 3rem; min-height: 3rem; max-height: 3rem; }
  .review-viewer-sticky-thumbnail { flex-basis: 3.25rem; width: 3.25rem; height: 3.25rem; }
  .review-viewer-item.is-sticky-note .review-viewer-item-body { margin-inline-start: calc(3.25rem + 2.25rem + (var(--tb-space-2) * 2)); }
  .review-sticky-editor-backdrop { padding: .75rem; }
  .review-sticky-editor { width: 100%; max-height: 96vh; }
  .review-sticky-editor-paper { width: min(82vw, 58vh); }
}

/* CM3 normalized review markup. The surface travels with the immutable image
   canvas, so pan/zoom and resize never turn stored coordinates into viewport
   pixels. */
.review-markup-surface {
  position: absolute;
  z-index: 6;
  pointer-events: none;
  box-sizing: border-box;
  outline: 0;
}

.review-markup-surface[hidden] { display: none !important; }
.review-markup-surface.is-placing { pointer-events: auto; cursor: crosshair; }
.review-markup-surface.is-point-placing { cursor: crosshair; }
.review-markup-surface.is-point-placing.is-awaiting-confirmation { cursor: default; }
.review-markup-surface.is-moving { pointer-events: none; cursor: grab; }

.review-markup-control,
.review-markup-placement-preview {
  position: absolute;
  box-sizing: border-box;
  color: var(--review-marker-color, #0876b9);
}

.review-markup-control {
  pointer-events: auto;
  border: 0;
  cursor: pointer;
  font: inherit;
  outline: 0;
}

/* The shared tooltip enhancer adds data-tooltip to these buttons. Keep their
   containing block on the normalized markup surface rather than the stage. */
.review-markup-surface .review-markup-control,
.review-markup-surface .review-markup-placement-preview { position: absolute; }

.review-markup-surface.is-moving .review-markup-control { cursor: grab; }
.review-markup-surface.is-moving .review-markup-control:active { cursor: grabbing; }

.review-markup-control:is(:hover, :focus-visible),
.review-markup-control.is-associated { z-index: 2; }

.review-markup-point {
  width: 1.1rem;
  height: 1.1rem;
  padding: 0;
  border: .13rem solid #fff;
  border-radius: 50%;
  background: var(--review-marker-color, #0876b9);
  box-shadow: 0 1px 3px rgb(0 0 0 / 32%);
  opacity: .28;
  transform: translate(-50%, -50%);
  transition: opacity .12s ease, transform .12s ease, box-shadow .12s ease;
}

.review-markup-point-fill { display: block; width: 100%; height: 100%; border-radius: inherit; }
.review-markup-drag-handle { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; pointer-events: none; }
.review-markup-drag-handle svg { width: 1rem; height: 1rem; fill: none; stroke: #fff; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; filter: drop-shadow(0 1px 1px rgb(0 0 0 / 42%)); }
.review-markup-surface.is-moving .review-markup-control:is(:hover, :focus-visible) .review-markup-drag-handle { opacity: 1; }
.review-markup-point:is(:hover, :focus-visible),
.review-markup-point.is-associated { opacity: 1; }
.review-markup-point.is-moving { opacity: 1; }
.review-markup-point.is-selected { transform: translate(-50%, -50%) scale(1.22); box-shadow: 0 0 0 .16rem color-mix(in srgb, var(--review-marker-color, #0876b9) 35%, #fff), 0 2px 5px rgb(0 0 0 / 36%); }

.review-markup-rectangle {
  min-width: .2rem;
  min-height: .2rem;
  border: .14rem solid var(--review-marker-color, #0876b9);
  border-radius: .18rem;
  background: color-mix(in srgb, var(--review-marker-color, #0876b9) 14%, transparent);
  opacity: .5;
  transition: opacity .12s ease, border-width .12s ease, background .12s ease;
}

.review-markup-rectangle:is(:hover, :focus-visible),
.review-markup-rectangle.is-associated { opacity: 1; background: color-mix(in srgb, var(--review-marker-color, #0876b9) 22%, transparent); }

.review-markup-circle {
  min-width: .2rem;
  min-height: .2rem;
  border: .14rem solid var(--review-marker-color, #0876b9);
  border-radius: 50%;
  background: color-mix(in srgb, var(--review-marker-color, #0876b9) 14%, transparent);
  opacity: .5;
  transition: opacity .12s ease, border-width .12s ease, background .12s ease;
}

.review-markup-circle:is(:hover, :focus-visible),
.review-markup-circle.is-associated { opacity: 1; background: color-mix(in srgb, var(--review-marker-color, #0876b9) 22%, transparent); }
.review-markup-rectangle.is-selected,
.review-markup-circle.is-selected { border-width: .2rem; }

.review-markup-sticky {
  min-width: 7rem;
  max-width: min(12rem, 42vw);
  min-height: 3.6rem;
  padding: .55rem .65rem;
  border: .12rem solid var(--review-marker-color, #0876b9);
  border-radius: .2rem;
  background: color-mix(in srgb, var(--review-marker-color, #0876b9) 13%, #fff);
  box-shadow: 0 2px 5px rgb(0 0 0 / 18%);
  color: var(--tb-color-text-primary);
  font-size: var(--tb-type-metadata-size);
  line-height: 1.25;
  text-align: left;
  opacity: .7;
  overflow-wrap: anywhere;
  transition: opacity .12s ease, transform .12s ease;
}

.review-markup-sticky:is(:hover, :focus-visible),
.review-markup-sticky.is-associated { opacity: 1; }
.review-markup-sticky.is-selected { transform: scale(1.04); transform-origin: top left; }

.review-markup-placement-preview {
  pointer-events: none;
  opacity: .92;
  border-style: dashed;
}

.review-markup-placement-preview.review-markup-point { transform: translate(-50%, -50%); }
.review-markup-placement-preview.review-markup-sticky { pointer-events: none; }
.review-markup-placement-preview.review-markup-point { opacity: 1; border-style: solid; }
.review-markup-placement-preview.is-draft { opacity: 1; }
.review-markup-placement-actions { position: absolute; z-index: 8; display: inline-flex; align-items: center; gap: .2rem; padding: .2rem; border: var(--tb-border-boundary); border-radius: var(--tb-radius-control); background: var(--tb-color-surface); box-shadow: var(--tb-shadow-raised); pointer-events: auto; transform: var(--review-placement-transform, translate(.5rem, -50%)) scale(calc(1 / var(--review-markup-zoom, 1))); transform-origin: var(--review-placement-transform-origin, 0 50%); }
.review-markup-placement-actions button { display: grid; place-items: center; width: 1.8rem; height: 1.8rem; min-height: 1.8rem; padding: 0; border: var(--tb-border-boundary); border-radius: var(--tb-radius-control); background: var(--tb-color-surface); cursor: pointer; }
.review-markup-placement-actions button:is(:hover, :focus-visible) { outline: var(--tb-focus-outline); outline-offset: 2px; }
.review-markup-placement-actions button svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.review-markup-placement-confirm { color: var(--tb-color-success-fg); }
.review-markup-placement-confirm:is(:hover, :focus-visible) { border-color: var(--tb-color-success-border); background: var(--tb-color-success-bg); }
.review-markup-placement-cancel { color: var(--tb-color-error-fg); }
.review-markup-placement-cancel:is(:hover, :focus-visible) { border-color: var(--tb-color-error-border); background: var(--tb-color-error-bg); }

.review-viewer-composer-shell { position: relative; display: grid; box-sizing: border-box; gap: var(--tb-space-2); }
.review-viewer-composer-shell.is-active { border-radius: var(--tb-panel-radius); background: color-mix(in srgb, var(--tb-color-accent) 8%, var(--tb-color-surface)); box-shadow: inset 0 0 0 .12rem color-mix(in srgb, var(--tb-color-accent) 38%, transparent), 0 0 0 .15rem color-mix(in srgb, var(--tb-color-accent) 16%, transparent); }
.review-viewer-composer-modes { display: flex; gap: .25rem; overflow-x: auto; border-bottom: var(--tb-border-divider); }
.review-viewer-composer-mode {
  min-height: var(--tb-density-control-height);
  border: 0;
  border-bottom: .15rem solid transparent;
  background: transparent;
  color: var(--tb-color-text-muted);
  cursor: pointer;
  font: var(--tb-font-weight-strong) var(--tb-type-metadata-size)/1.2 var(--tb-font-family-body);
  padding: .25rem .5rem;
  white-space: nowrap;
}
.review-viewer-composer-mode:is(:hover, :focus-visible),
.review-viewer-composer-mode.is-active { border-bottom-color: var(--tb-color-accent); color: var(--tb-color-text-link); outline: none; }
.review-viewer-composer-cancel-placement { display: grid; flex: 0 0 auto; place-items: center; width: var(--tb-density-control-height); height: var(--tb-density-control-height); min-height: var(--tb-density-control-height); margin-inline-start: auto; padding: 0; border: var(--tb-border-boundary); border-radius: var(--tb-radius-control); background: var(--tb-color-surface); color: var(--tb-color-error-fg); cursor: pointer; }
.review-viewer-composer-cancel-placement:is(:hover, :focus-visible) { border-color: var(--tb-color-error-border); background: var(--tb-color-error-bg); outline: var(--tb-focus-outline); outline-offset: 2px; }
.review-viewer-composer-cancel-placement svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.review-viewer-place-button { display: inline-flex; align-items: center; gap: .35rem; min-height: var(--tb-density-control-height); border: var(--tb-border-boundary); border-radius: var(--tb-button-radius); background: var(--tb-color-surface); color: var(--tb-color-text-link); cursor: pointer; font: inherit; padding: 0 .55rem; }
.review-viewer-place-button:is(:hover, :focus-visible) { border-color: var(--tb-color-accent); background: var(--tb-color-interaction-hover); outline: var(--tb-focus-outline); outline-offset: var(--tb-focus-outline-offset); }
.review-viewer-place-button svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.review-viewer-place-button.is-markup-tool { flex: 0 0 var(--tb-density-control-height); width: var(--tb-density-control-height); min-width: var(--tb-density-control-height); height: var(--tb-density-control-height); justify-content: center; padding: 0; border-color: transparent; background: transparent; }
.review-viewer-place-button.is-markup-tool:not(:hover, :focus-visible, .is-active) { border-color: transparent; background: transparent; box-shadow: none; }
.review-viewer-place-button.is-markup-tool:is(:hover, :focus-visible, .is-active) { border-color: var(--tb-color-accent); background: var(--tb-color-interaction-hover); outline: var(--tb-focus-outline); outline-offset: var(--tb-focus-outline-offset); }
.review-viewer-place-button.is-point-marker.is-placed { color: var(--tb-color-accent); }
.review-viewer-send:disabled { cursor: not-allowed; opacity: .45; }
.review-viewer-type-badge { display: inline-flex; align-items: center; min-height: 1.4rem; padding: 0 .35rem; border: var(--tb-border-divider); border-radius: 999px; color: var(--tb-color-text-muted); font-family: var(--tb-font-family-mono); font-size: .65rem; letter-spacing: .02em; }
.review-associated-item { transition: background .12s ease, box-shadow .12s ease; }
.review-associated-item:is(:hover, :focus-visible),
.review-associated-item.is-associated { background: var(--tb-color-interaction-hover); box-shadow: inset .18rem 0 0 var(--review-marker-color, var(--tb-color-accent)); outline: none; }
.review-viewer-item.is-unread,
.review-viewer-thread.is-landing-unread > .review-viewer-item:first-child { background: var(--tb-color-interaction-hover); box-shadow: inset .18rem 0 0 var(--tb-color-character-accent); }
.review-associated-item:focus-visible { outline: var(--tb-focus-outline); outline-offset: var(--tb-focus-outline-offset); }

@media (max-width: 40rem) {
  .sheet.no-mockup { grid-template-columns: minmax(18rem, 1fr); }
  .review-viewer-composer-actions { align-items: stretch; flex-wrap: wrap; }
  .review-viewer-composer-actions .review-viewer-place-button:not(.is-markup-tool) { flex: 1 1 9rem; }
  .review-viewer-composer-actions .review-viewer-send { flex: 0 0 auto; }
  .review-markup-sticky { max-width: 9rem; }
}

@media (forced-colors: active) {
  .review-viewer-approval-feed-item { border-color: CanvasText; background: Canvas; color: CanvasText; }
  .review-viewer-surface-toggle.is-active { border-color: Highlight; color: Highlight; opacity: 1; }
  .review-viewer-surface-toggle.is-hidden { border-color: ButtonText; color: ButtonText; opacity: 1; }
  .review-markup-point,
  .review-markup-rectangle,
  .review-markup-circle,
  .review-markup-sticky { border-color: ButtonText; background: Canvas; color: ButtonText; opacity: 1; }
  .review-markup-point { outline: .15rem solid Canvas; }
  .review-markup-drag-handle svg { stroke: ButtonText; filter: none; }
  .review-markup-control.is-associated,
  .review-associated-item.is-associated { outline: .2rem solid Highlight; outline-offset: .15rem; box-shadow: none; }
}

@media print {
  html,
  body {
    width: auto;
    height: auto;
    min-width: 0;
    overflow: visible;
    background: Canvas !important;
    color: CanvasText !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .skip-link,
  header.bar,
  footer.bar,
  .filterPopover,
  .searchResults,
  .jumpResults,
  .pop,
  .copied,
  .ovtip,
  .sgview,
  .themeControl,
  .filterbar,
  .sheetJump,
  .nav,
  .sheetSearch,
  .zhint,
  .ovhint,
  .lochint,
  .mvhint,
  .zoomctl,
  .mvctl,
  .swap-expand,
  .expandbtn,
    .versionSelect,
    .review-mode-toggle,
  .review-viewer-panel,
    .review-viewer-status-dock,
    .review-markup-surface,
    .review-viewer-composer-shell,
    #locReviewBody,
    .print-hide,
  .contentCopy,
  .locpanel,
  .loccoord,
  .locpop,
  .loclegend-actions,
  model-viewer,
  .locModeSwitch {
    display: none !important;
  }

  .app,
  .stagearea {
    display: block;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .panel,
  .phead,
  .sectionhdr,
  .stage,
  .ovstage,
  .locstage,
  .locside {
    border-color: CanvasText !important;
    background: Canvas !important;
    box-shadow: none !important;
    color: CanvasText !important;
  }

  .panel::before,
  .panel::after,
  .phead::before,
  .sectionhdr::before {
    display: none !important;
  }

  .phead,
  .sectionhdr {
    min-height: 0;
    background: ButtonFace !important;
  }

  body[data-print-view] #sheetView,
  body[data-print-view] #overview,
  body[data-print-view] #locationView {
    display: none !important;
  }

  #batchPrint { display: block; }
  .print-sheet { color: CanvasText; }
  .print-sheet-model-note { display: block; }

  .material-screen-list {
    display: none !important;
  }

  .material-print-list {
    display: block !important;
  }

  .delivs {
    gap: .06in;
  }

  .deliv {
    display: block;
    border: 0;
    border-radius: 0;
    padding: .03in 0;
    color: CanvasText !important;
    overflow-wrap: anywhere;
  }

  .deliv svg {
    display: none;
  }

  .deliverable-url {
    display: block;
    margin-top: .02in;
    color: CanvasText;
    font-family: var(--tb-font-family-mono);
    font-size: 7pt;
    overflow-wrap: anywhere;
  }

  body[data-print-view="overview"] #overview {
    display: block !important;
    position: static;
    min-height: calc(var(--print-paper-height, 8.5in) - var(--print-page-margin, .25in) - var(--print-page-margin, .25in));
    overflow: visible;
  }

  body.print-mode #overview {
    display: flex !important;
    position: static;
    min-height: 7in;
    overflow: visible;
  }

  body.print-mode #overview .ovstage {
    position: relative;
    min-height: 6.8in;
    overflow: hidden;
  }

  body[data-print-view="overview"] .ovstage {
    position: relative;
    height: calc(var(--print-paper-height, 8.5in) - var(--print-page-margin, .25in) - var(--print-page-margin, .25in));
    min-height: 0;
    overflow: hidden;
  }

  body[data-print-view="overview"] #overview {
    display: block !important;
    position: relative;
    box-sizing: border-box;
    height: calc(var(--print-paper-height, 8.5in) - var(--print-page-margin, .25in) - var(--print-page-margin, .25in));
    min-height: 0;
  }

  body[data-print-view="overview"] #overview .overview-print-logo {
    display: block !important;
  }

  body[data-print-view="overview"] #overview .print-logo-name {
    color: CanvasText !important;
  }

  body[data-print-view="location"] #locationView {
    display: grid !important;
    position: relative;
    box-sizing: border-box;
    grid-template-columns: minmax(0, 1fr) var(--locSide);
    grid-template-rows: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: .12in;
    width: auto;
    height: calc(var(--print-paper-height, 8.5in) - var(--print-page-margin, .25in) - var(--print-page-margin, .25in));
    min-height: 0;
    overflow: hidden;
  }

  body[data-print-view="location"] .locstage {
    position: relative;
    inset: auto;
    right: auto;
    bottom: auto;
    grid-column: 1;
    grid-row: 1;
    width: auto;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  body[data-print-view="location"] .locside {
    position: relative;
    inset: auto;
    grid-column: 2;
    grid-row: 1;
    width: auto;
    height: 100%;
    margin: 0;
    overflow: hidden;
  }

  body[data-print-view="location"] #locLegendBody {
    overflow: visible;
  }

  body[data-print-view="location"] .location-print-logo {
    display: block !important;
    grid-column: 1 / -1;
    grid-row: 2;
    width: auto;
    min-height: .35in;
    margin: 0;
  }

  body[data-print-view="location"] .print-logo-name {
    color: CanvasText !important;
  }

  body[data-print-view="location"] .locbar {
    background: Canvas !important;
    border-color: CanvasText !important;
    color: CanvasText !important;
    box-shadow: none !important;
  }

  .locgrid,
  .dimsvg,
  .measure-svg,
  .scalebar,
  .dimbar,
  .dimlabel {
    filter: grayscale(1) contrast(1.2);
  }

  .status,
  .status .dot {
    color: CanvasText !important;
    background: CanvasText !important;
    box-shadow: none;
  }
}

/* Sticky Note render overrides follow the legacy markup rules above. */
.review-markup-sticky { min-width: 0; max-width: none; min-height: 0; padding: 0; border: 0; border-radius: .14rem; background: var(--review-sticky-background, #fff); box-shadow: 0 .3rem .7rem rgb(0 0 0 / 26%); opacity: 1; overflow: hidden; transform: rotate(var(--review-sticky-rotation, 0deg)); transform-origin: center; }
.review-markup-sticky:is(:hover, :focus-visible), .review-markup-sticky.is-associated { opacity: 1; box-shadow: 0 .38rem .85rem rgb(0 0 0 / 32%); }
.review-markup-sticky.is-selected { outline: .16rem solid var(--tb-color-accent); outline-offset: .14rem; }
.review-markup-sticky-paper { display: block; width: 100%; height: 100%; }
.review-markup-sticky-paper svg { display: block; width: 100%; height: 100%; overflow: visible; }
.review-markup-sticky-paper polyline { fill: none; stroke: #111820; stroke-linecap: round; stroke-linejoin: round; stroke-width: .7; vector-effect: none; }
