:root {
  color-scheme: light;
  /* Base tokens come from ui-base.css + palettes/executive.css (ui-system, Executive).
     These local names map onto them, so the rest of this file stays unchanged. */
  --ink: var(--text);
  --ink-soft: var(--text2);
  --paper: var(--bg);
  --panel: var(--surface2);
  --surface-muted: var(--surface2);
  --viewer: var(--surface3);
  --line: var(--border);
  --line-strong: var(--border2);
  --navy: var(--text);
  --navy-soft: var(--text2);
  --white: var(--surface);
  --radius: var(--r-md);
  --shadow: var(--shadow-md);
  --shadow-soft: var(--shadow-sm);
  /* Blue selection is the Executive accent. */
  --selection: var(--accent);
  --selection-soft: var(--accent-dim);
  /* Orange is the mark colour: a linked occurrence on the drawing. It is a semantic
     colour, like CDI's node colours, not the tool accent. */
  --mark: hsl(24 92% 54%);
  --mark-deep: hsl(20 86% 42%);
  --mark-soft: hsl(29 100% 94%);
  /* Relation families. Orange and blue stay reserved for marks and selection. */
  --relation-assembly: hsl(218 32% 36%);
  --relation-spatial: hsl(174 62% 30%);
  --relation-system: hsl(262 50% 50%);
  --relation-data: hsl(328 58% 44%);
  --relation-general: hsl(216 12% 46%);
  --danger: hsl(5 64% 40%);
  font-family: var(--font-body);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--paper);
}

button,
input,
select {
  font: inherit;
}

button,
.file-button {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
.file-button:focus-within,
.compact-action:focus-visible,
.occurrence-list button:focus-visible,
.occurrence-shape:focus-visible {
  outline: 3px solid hsl(205 90% 48% / 0.42);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.app-header {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 14px;
  color: var(--white);
  background: linear-gradient(120deg, var(--navy), var(--navy-soft));
  border-bottom: 2px solid var(--accent);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 9px;
}

.eyebrow {
  margin: 0 0 2px;
  color: inherit;
  font-size: 0.67rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.72;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-family: var(--font-display);
  font-size: 0.96rem;
  letter-spacing: 0.01em;
}

.app-shell {
  height: calc(100% - 40px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(240px, 20vw, 300px);
}

.workspace {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  background: hsl(215 18% 91%);
}

.toolbar {
  grid-row: 1;
  min-height: 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 hsl(220 20% 20% / 0.03);
  z-index: 4;
}

.toolbar-document,
.toolbar-navigation,
.toolbar-actions {
  min-width: 0;
  display: flex;
  align-items: center;
}

.toolbar-document {
  gap: 10px;
}

.toolbar-document .file-button {
  flex: none;
}

/* The toolbar wraps by its own width, not the window's: the side panel and
   thumbnails take space too. Below this width, navigation moves to a second row. */
.workspace {
  container-type: inline-size;
}

@container (max-width: 1260px) {
  .toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .toolbar-actions {
    grid-column: 2;
    grid-row: 1;
  }

  .toolbar-navigation {
    grid-column: 1 / -1;
  }
}

.toolbar-navigation {
  flex-wrap: wrap;
  gap: 6px 10px;
}

.toolbar-actions {
  justify-content: flex-end;
  gap: 6px;
}

.button,
.icon-button {
  min-height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--ink);
  background: var(--white);
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease, color 120ms ease;
}

.button:hover:not(:disabled),
.icon-button:hover:not(:disabled) {
  border-color: var(--ink-soft);
  background: var(--surface-muted);
}

.button:disabled,
.icon-button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.button-primary {
  border-color: var(--accent);
  color: var(--on-accent);
  background: var(--accent);
}

.button-primary:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--accent);
  filter: brightness(0.92);
}

.button-quiet {
  border-color: transparent;
  background: transparent;
}

.mark-button {
  border-color: var(--mark-deep);
  color: var(--mark-deep);
}

.mark-button[aria-pressed="true"] {
  color: var(--white);
  background: var(--mark-deep);
  box-shadow: 0 0 0 4px var(--mark-soft);
}

.icon-button {
  width: 30px;
  padding: 0;
  font-size: 0.92rem;
  font-weight: 700;
}

.document-name {
  min-width: 0;
  max-width: 270px;
  flex: 1 1 120px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toolbar-divider {
  width: 1px;
  height: 27px;
  background: var(--line);
}

.control-group {
  display: flex;
  align-items: center;
  gap: 5px;
}

.toolbar-cluster {
  padding: 2px;
  border: 1px solid hsl(215 17% 84% / 0.72);
  border-radius: 9px;
  background: var(--surface-muted);
}

.toolbar-cluster .icon-button,
.toolbar-cluster .button-quiet,
.toolbar-cluster .page-field input {
  border-color: transparent;
  background: transparent;
}

.toolbar-cluster .icon-button:hover:not(:disabled),
.toolbar-cluster .button-quiet:hover:not(:disabled) {
  border-color: var(--line);
  background: var(--white);
}

.history-controls {
  justify-content: center;
}

.page-field input {
  width: 44px;
  height: 30px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  text-align: center;
}

.page-count,
.zoom-value {
  min-width: 34px;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 650;
}

.zoom-value {
  min-width: 48px;
  text-align: center;
}

.view-button {
  min-width: 48px;
  padding-inline: 8px;
}

.pdf-search-bar {
  grid-row: 2;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto repeat(3, 32px);
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 2px 8px hsl(220 20% 20% / 0.05);
  z-index: 3;
}

.pdf-search-bar[hidden] {
  display: none;
}

.pdf-search-field {
  min-width: 0;
}

.pdf-search-field input {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 5px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
}

.pdf-search-field input:focus {
  border-color: var(--selection);
  outline: 2px solid var(--selection-soft);
  outline-offset: 1px;
}

.pdf-search-count {
  min-width: 66px;
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

.pdf-search-bar .icon-button {
  width: 32px;
  min-height: 32px;
  font-size: 0.88rem;
}

/* Thumbnails beside the drawing. The row keeps the workspace's third grid row. */
.viewer-row {
  grid-row: 3;
  min-height: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
}

.thumbnail-panel {
  grid-column: 1;
  width: 148px;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 10px 16px;
  border-right: 1px solid var(--line);
  background: var(--surface-muted);
}

.thumbnail-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.thumbnail-button {
  position: relative;
  width: 100%;
  display: grid;
  gap: 4px;
  justify-items: center;
  padding: 5px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--ink-soft);
  background: none;
  font: inherit;
  font-size: 0.72rem;
  cursor: pointer;
}

.thumbnail-button:hover {
  border-color: var(--line-strong);
  background: var(--white);
}

.thumbnail-button[aria-current="page"] {
  border-color: var(--selection);
  background: hsl(205 80% 97%);
  color: var(--selection);
  font-weight: 800;
}

.thumbnail-frame {
  width: 112px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: 0 1px 3px hsl(220 28% 16% / 0.12);
}

.thumbnail-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.thumbnail-badge {
  position: absolute;
  top: 9px;
  right: 9px;
  min-width: 20px;
  padding: 1px 5px;
  border-radius: 999px;
  color: var(--white);
  background: hsl(24 80% 42%);
  font-size: 0.64rem;
  font-weight: 800;
  text-align: center;
}

/* Pages where the selected object appears. */
.thumbnail-button.has-selected .thumbnail-frame {
  outline: 3px solid var(--selection);
  outline-offset: 1px;
}

.viewer-stage {
  grid-column: 2;
  min-height: 0;
  position: relative;
  display: grid;
  place-items: safe center;
  place-content: safe center;
  overflow: auto;
  padding: 32px;
  background:
    radial-gradient(circle at 50% 42%, hsl(0 0% 100% / 0.72), transparent 66%),
    var(--viewer);
}

.viewer-stage.is-pan-ready,
.viewer-stage.is-pan-ready .occurrence-overlay {
  cursor: grab;
}

.viewer-stage.is-panning,
.viewer-stage.is-panning .occurrence-overlay {
  cursor: grabbing;
}

.marking-guide {
  max-width: min(430px, calc(100% - 24px));
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border: 1px solid hsl(24 78% 70%);
  border-radius: 10px;
  color: var(--ink);
  background: hsl(29 100% 97% / 0.96);
  box-shadow: 0 8px 22px hsl(24 50% 20% / 0.13);
  line-height: 1.25;
  pointer-events: none;
  backdrop-filter: blur(5px);
}

.marking-guide[hidden] {
  display: none;
}

.marking-pulse {
  width: 10px;
  height: 10px;
  border: 2px solid var(--white);
  border-radius: 50%;
  background: var(--mark);
  box-shadow: 0 0 0 3px hsl(24 92% 54% / 0.2);
}

.marking-guide-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.marking-guide-copy strong {
  font-size: 0.72rem;
}

.marking-guide-copy > span {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marking-guide kbd {
  min-width: 30px;
  padding: 3px 6px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  color: var(--ink-soft);
  background: var(--white);
  font-size: 0.62rem;
  text-align: center;
}

.empty-state {
  width: min(450px, 92%);
  color: var(--text);
  padding: 36px;
  border: 1px solid hsl(216 18% 80% / 0.86);
  border-radius: 14px;
  text-align: center;
  background: hsl(42 34% 98% / 0.96);
  box-shadow: var(--shadow-soft);
}

.empty-state h2 {
  margin-bottom: 10px;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.empty-state > p:not(.eyebrow) {
  max-width: 350px;
  margin: 0 auto 24px;
  color: var(--ink-soft);
  line-height: 1.55;
}

.empty-symbol {
  width: 76px;
  height: 76px;
  position: relative;
  margin: 0 auto 18px;
}

.empty-symbol span {
  position: absolute;
  inset: 8px;
  border: 2px solid var(--mark-deep);
  border-radius: 5px;
}

.empty-symbol span:nth-child(2) {
  inset: 17px 3px 2px 22px;
  border-color: var(--navy-soft);
}

.empty-symbol span:nth-child(3) {
  inset: 29px 23px 14px 0;
  border-color: var(--mark);
}

.page-surface {
  --total-scale-factor: 1;
  --scale-round-x: 1px;
  --scale-round-y: 1px;
  position: relative;
  flex: 0 0 auto;
  line-height: 0;
  background: var(--white);
  box-shadow: var(--shadow);
  user-select: none;
}

.page-content {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
}

.page-surface.is-zoom-preview .page-content {
  will-change: transform;
}

#pdfCanvas {
  display: block;
  background: var(--white);
}

/* Adapted from PDF.js v6.3.289 text_layer_builder.css (Apache-2.0). */
.text-layer {
  --min-font-size: 1;
  --text-scale-factor: calc(var(--total-scale-factor) * var(--min-font-size));
  --min-font-size-inv: calc(1 / var(--min-font-size));
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: clip;
  color-scheme: only light;
  text-align: initial;
  line-height: 1;
  letter-spacing: normal;
  word-spacing: normal;
  text-size-adjust: none;
  forced-color-adjust: none;
  transform-origin: 0 0;
  user-select: text;
}

.text-layer :is(span, br) {
  position: absolute;
  color: transparent;
  white-space: pre;
  cursor: text;
  transform-origin: 0 0;
  user-select: text;
}

.text-layer > :not(.markedContent),
.text-layer .markedContent span:not(.markedContent) {
  --font-height: 0;
  --scale-x: 1;
  --rotate: 0deg;
  z-index: 1;
  font-size: calc(var(--text-scale-factor) * var(--font-height));
  transform: rotate(var(--rotate)) scaleX(var(--scale-x)) scale(var(--min-font-size-inv));
}

.text-layer .markedContent {
  display: contents;
}

.text-layer span[role="img"] {
  cursor: default;
  user-select: none;
}

.text-layer::selection,
.text-layer ::selection {
  color: transparent;
  background: hsl(205 92% 49% / 0.26);
}

.text-layer br::selection {
  background: transparent;
}

/* PDF.js's selection boundary prevents Chromium from collapsing a drag into
   narrow fragments between absolutely positioned text spans. */
.text-layer .endOfContent {
  display: block;
  position: absolute;
  inset: 100% 0 0;
  z-index: 0;
  cursor: default;
  user-select: none;
}

.text-layer.selecting .endOfContent {
  top: 0;
}

.text-layer .pdf-search-highlight {
  color: transparent;
  background: hsl(45 100% 54% / 0.42);
  border-radius: 2px;
  box-decoration-break: clone;
}

.text-layer .pdf-search-highlight.is-active {
  background: hsl(24 100% 52% / 0.56);
  box-shadow: 0 0 0 1px var(--mark-deep);
}

.page-surface.is-marking .text-layer {
  pointer-events: none;
  user-select: none;
}

.occurrence-overlay {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  cursor: default;
  touch-action: none;
}

.occurrence-overlay.is-marking {
  cursor: crosshair;
  pointer-events: auto;
}

.occurrence-shape {
  fill: hsl(28 100% 52% / 0.11);
  stroke: var(--mark-deep);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  cursor: grab;
  pointer-events: auto;
  transition: fill 120ms ease, stroke-width 120ms ease;
}

.occurrence-shape:hover {
  fill: hsl(28 100% 52% / 0.2);
  stroke-width: 3;
}

.occurrence-shape:focus-visible {
  fill: hsl(205 92% 49% / 0.18);
  stroke: var(--selection);
  stroke-width: 3;
}

.occurrence-shape.is-selected {
  fill: var(--selection-soft);
  stroke: var(--selection);
  stroke-width: 3;
  filter: drop-shadow(0 2px 2px hsl(205 55% 20% / 0.2));
}

.occurrence-shape.is-object-active:not(.is-selected) {
  fill: hsl(28 100% 52% / 0.22);
  stroke-width: 3;
}

.occurrence-shape.is-unlinked:not(.is-selected) {
  fill: hsl(216 10% 50% / 0.08);
  stroke: hsl(216 13% 48%);
  stroke-dasharray: 6 4;
}

/* Marks reached by a relation trace. */
.occurrence-shape.is-traced:not(.is-selected) {
  stroke: var(--relation-system);
  stroke-width: 3;
  fill: hsl(262 50% 50% / 0.12);
}

.occurrence-shape.is-dimmed:not(.is-selected) {
  opacity: 0.22;
}

.occurrence-shape.is-moving,
.occurrence-shape.is-resizing {
  cursor: grabbing;
  fill: hsl(205 92% 49% / 0.2);
}

.selection-handle {
  fill: var(--white);
  stroke: var(--selection);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  pointer-events: auto;
  cursor: nwse-resize;
}

.selection-handle[data-resize-handle="ne"],
.selection-handle[data-resize-handle="sw"] {
  cursor: nesw-resize;
}

.polygon-vertex {
  fill: var(--white);
  stroke: var(--selection);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  cursor: move;
}

.draft-shape {
  fill: hsl(205 92% 49% / 0.1);
  stroke: hsl(205 78% 40%);
  stroke-width: 2;
  stroke-dasharray: 7 5;
  vector-effect: non-scaling-stroke;
}

.rendering-indicator {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
  padding: 8px 11px;
  border-radius: 999px;
  color: var(--white);
  background: hsl(218 34% 16% / 0.82);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  backdrop-filter: blur(5px);
}

.status-bar {
  grid-row: 4;
  min-height: 31px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 12px;
  color: var(--ink-soft);
  background: var(--surface-muted);
  border-top: 1px solid var(--line);
  font-size: 0.77rem;
}

.status-bar p {
  margin: 0;
}

/* Object browser on the right, like Revit's Project Browser.
   Properties float over the drawing on the left (see .properties-float). */
.side-panel {
  width: 100%;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
  border-left: 1px solid var(--line);
}

/* Several panel blocks set their own display, which would otherwise beat the hidden attribute. */
.side-panel [hidden],
.properties-float [hidden] {
  display: none !important;
}

.panel-pane {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  padding: 12px 12px 14px;
}

.panel-heading-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Floating Properties panel. It sits over the drawing's top-left corner and moves
   by a transform, so the drawing underneath never reflows. */
.viewer-row {
  position: relative;
}

.viewer-row > .viewer-stage {
  grid-row: 1;
}

.properties-float {
  grid-column: 2;
  grid-row: 1;
  z-index: 6;
  align-self: start;
  justify-self: start;
  width: 300px;
  max-width: calc(100% - 20px);
  /* Moving the panel down shortens it, so its bottom stays on screen. */
  max-height: calc(100% - 20px - max(0px, var(--float-y, 0px)));
  margin: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--white);
  box-shadow: var(--shadow);
  transform: translate(var(--float-x, 0px), var(--float-y, 0px));
  font-size: 0.8rem;
}

.properties-float.is-dragging {
  opacity: 0.92;
  user-select: none;
}

.float-heading {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 4px 4px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-muted);
  cursor: move;
  touch-action: none;
  user-select: none;
}

.float-heading h2 {
  flex: 1;
  margin: 0;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.float-button {
  width: 26px;
  min-height: 26px;
  border-color: transparent;
  background: transparent;
}

.float-body {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 12px 12px;
}

.properties-float.is-collapsed .float-body {
  display: none;
}

.properties-float.is-collapsed .float-heading {
  border-bottom: 0;
}

.object-id-line {
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  opacity: 0.8;
}

/* Right-click menu. */
.context-menu {
  position: fixed;
  z-index: 60;
  min-width: 210px;
  max-width: 280px;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
  font-size: 0.78rem;
}

.context-menu-title {
  margin: 0;
  padding: 5px 8px 4px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.context-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 8px;
  border: 0;
  border-radius: 5px;
  color: var(--ink);
  background: none;
  text-align: left;
  cursor: pointer;
}

.context-menu-item:hover:not(:disabled),
.context-menu-item:focus-visible {
  background: hsl(205 80% 95%);
  outline: none;
}

.context-menu-item:disabled {
  opacity: 0.4;
  cursor: default;
}

.context-menu-item.is-danger {
  color: var(--danger);
}

.context-menu-item kbd {
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.68rem;
}

.context-menu-line {
  margin: 4px 2px;
  border: 0;
  border-top: 1px solid var(--line);
}

.display-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  margin: 12px 0 10px;
}

.display-bar select {
  max-width: 124px;
}

.display-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  margin: -4px 0 10px;
  color: var(--ink-soft);
  font-size: 0.74rem;
}

.display-option {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.display-option select {
  min-height: 28px;
  padding: 2px 6px;
  font-size: 0.74rem;
}

.display-check {
  cursor: pointer;
}

/* Object labels drawn over the page. Positioned in page percentages, so they follow zoom. */
.mark-labels {
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
}

.mark-label {
  position: absolute;
  max-width: 14ch;
  overflow: hidden;
  padding: 0 4px;
  border-radius: 3px;
  color: var(--white);
  background: hsl(24 80% 38% / 0.88);
  font-size: 10px;
  font-weight: 700;
  line-height: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: translateY(-100%);
}

.mark-label.is-selected {
  background: var(--selection);
}

.mark-label.is-dimmed {
  opacity: 0.35;
}

/* Relations drawn between marks. One colour per family, dashed when undirected. */
.family-assembly { --relation-color: var(--relation-assembly); }
.family-spatial { --relation-color: var(--relation-spatial); }
.family-system { --relation-color: var(--relation-system); }
.family-data { --relation-color: var(--relation-data); }
.family-general { --relation-color: var(--relation-general); }

.relation-line {
  fill: none;
  stroke: var(--relation-color);
  stroke-width: 2;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.relation-line.is-undirected {
  stroke-dasharray: 5 4;
}

.relation-arrow {
  fill: var(--relation-color);
  pointer-events: none;
}

.relation-line.is-quiet,
.relation-arrow.is-quiet,
.relation-pill.is-quiet {
  opacity: 0.3;
}

.relation-handle {
  fill: var(--white);
  stroke: var(--relation-system);
  stroke-width: 2.5;
  vector-effect: non-scaling-stroke;
  pointer-events: auto;
  cursor: crosshair;
}

.relation-handle:hover {
  fill: var(--relation-system);
}

.relation-preview {
  fill: none;
  stroke: var(--relation-system);
  stroke-width: 2;
  stroke-dasharray: 6 5;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.relation-labels {
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
}

.relation-pill {
  position: absolute;
  max-width: 18ch;
  overflow: hidden;
  padding: 0 7px;
  border: 1px solid var(--relation-color);
  border-radius: 999px;
  color: var(--relation-color);
  background: hsl(0 0% 100% / 0.94);
  box-shadow: 0 1px 3px hsl(220 30% 20% / 0.16);
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  line-height: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
}

.relation-pill:hover,
.relation-pill:focus-visible {
  color: var(--white);
  background: var(--relation-color);
  opacity: 1;
}

.page-surface.is-marking .relation-pill,
.page-surface.is-relating .relation-pill {
  pointer-events: none;
}

.page-surface.is-relating .occurrence-shape,
.side-panel.is-relating .object-card-button {
  cursor: crosshair;
}

.relation-guide {
  border-color: hsl(262 42% 76%);
  background: hsl(262 60% 98% / 0.96);
}

.relation-guide .marking-pulse {
  background: var(--relation-system);
  box-shadow: 0 0 0 3px hsl(262 50% 50% / 0.2);
}

.object-groups {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.object-group-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.object-group-toggle {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 2px;
  border: 0;
  color: var(--ink);
  background: none;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.object-group-toggle::before {
  content: "\25B8";
  display: inline-block;
  width: 10px;
  color: var(--ink-soft);
  transition: transform 120ms ease;
}

.object-group-toggle[aria-expanded="true"]::before {
  transform: rotate(90deg);
}

.object-group-toggle small {
  color: var(--ink-soft);
  font-weight: 600;
}

.object-group-visibility {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-soft);
  font-size: 0.7rem;
  cursor: pointer;
}

.object-group.is-hidden-on-drawing .object-card-button {
  opacity: 0.55;
}

.object-group .object-list {
  gap: 3px;
  margin-top: 2px;
}

/* Browser rows stay compact, like a tree in Revit or Visual Studio. */
.object-group .object-card-button {
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 7px;
}

.object-group .object-icon {
  width: 26px;
  height: 26px;
  border-radius: 5px;
  font-size: 0.6rem;
}

.object-group .object-label {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 8px;
}

.object-group .object-label small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-summary {
  cursor: pointer;
  list-style: none;
}

.section-summary::-webkit-details-marker {
  display: none;
}

.section-summary h3::before {
  content: "\25B8";
  display: inline-block;
  width: 12px;
  color: var(--ink-soft);
  transition: transform 120ms ease;
}

details[open] > .section-summary h3::before {
  transform: rotate(90deg);
}

.panel-heading,
.section-heading {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.panel-heading h2 {
  margin-bottom: 0;
  font-size: 0.95rem;
}

.count-badge {
  min-width: 24px;
  height: 22px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--white);
  background: var(--navy);
  font-size: 0.7rem;
  font-weight: 800;
}

.concept-note {
  display: grid;
  gap: 3px;
  margin: 16px 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 7px;
  background: hsl(29 65% 98%);
  font-size: 0.77rem;
  line-height: 1.4;
}

.concept-note span {
  color: var(--ink-soft);
}

.object-composer,
.document-section,
.object-section,
.selected-object-panel,
.unlinked-section,
.sidecar-section {
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.object-composer h3,
.document-section h3,
.object-section h3,
.selected-object-panel h3,
.unlinked-section h3,
.sidecar-section h3 {
  margin-bottom: 10px;
  font-size: 0.86rem;
}

.object-composer {
  margin-bottom: 16px;
}

.shape-tool select {
  min-height: 38px;
  max-width: 112px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
}

.document-section {
  margin-bottom: 16px;
}

#drawingMapBadge {
  white-space: nowrap;
}

.notes-dialog,
.drawing-map-dialog,
.representation-board {
  position: fixed;
  z-index: 20;
  inset: 0;
  margin: auto;
}

.notes-dialog {
  width: min(680px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 24px 80px hsl(220 35% 12% / 0.34);
}

.notes-dialog::backdrop {
  background: hsl(218 45% 12% / 0.7);
  backdrop-filter: blur(3px);
}

.notes-dialog-shell {
  max-height: calc(100vh - 32px);
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  overflow: hidden;
}

.notes-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.notes-dialog-header h2,
.notes-dialog-header p {
  margin: 0;
}

.notes-dialog-header .quiet-copy {
  margin-top: 5px;
}

.notes-dialog-actions,
.note-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.notes-dialog-actions > span,
.note-scope-label {
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 750;
}

.note-form {
  display: grid;
  grid-template-columns: minmax(140px, 0.35fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.note-form label {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.note-text {
  min-height: 76px;
  resize: vertical;
}

.notes-dialog #noNotes {
  grid-row: 3;
  margin: 18px 20px;
}

.notes-list {
  grid-row: 4;
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 14px 20px 20px;
  overflow: auto;
  list-style: none;
}

.note-card {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.note-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.note-target {
  padding: 0;
  overflow: hidden;
  border: 0;
  color: var(--selection);
  background: transparent;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.note-card textarea {
  width: 100%;
  min-height: 70px;
  resize: vertical;
}

.note-card-actions {
  justify-content: flex-end;
}

.drawing-map-dialog {
  width: min(920px, calc(100vw - 32px));
  max-width: none;
  height: min(760px, calc(100vh - 32px));
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 1px solid hsl(216 20% 68% / 0.75);
  border-radius: 14px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 24px 80px hsl(220 35% 12% / 0.34);
}

.drawing-map-dialog::backdrop {
  background: hsl(218 45% 12% / 0.7);
  backdrop-filter: blur(3px);
}

.drawing-map-dialog-shell {
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.drawing-map-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.drawing-map-dialog-header h2,
.drawing-map-dialog-header p {
  margin: 0;
}

.drawing-map-dialog-header .quiet-copy {
  margin-top: 5px;
}

.drawing-map-dialog-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawing-map-dialog-actions > span {
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 750;
}

.drawing-map-dialog > .drawing-map-dialog-shell > .drawing-map {
  align-content: start;
  overflow: auto;
  padding: 16px 20px 22px;
}

.drawing-map {
  display: grid;
  gap: 8px;
}

.drawing-map-document {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--white);
}

.drawing-map-document.is-active {
  border-color: var(--selection);
  box-shadow: inset 3px 0 0 var(--selection);
}

.drawing-map-document.is-missing {
  background: var(--accent2-dim);
}

.drawing-map-document-heading {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  cursor: pointer;
}

.drawing-map-document-heading:hover {
  background: var(--panel);
}

.drawing-map-document-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.drawing-map-document-copy strong,
.drawing-map-document-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawing-map-document-copy strong {
  font-size: 0.74rem;
}

.drawing-map-document-copy small,
.drawing-map-source-state {
  color: var(--ink-soft);
  font-size: 0.62rem;
}

.drawing-map-source-state {
  padding: 4px 6px;
  border-radius: 999px;
  background: var(--panel);
  white-space: nowrap;
}

.drawing-map-document.is-missing .drawing-map-source-state {
  color: var(--accent2-text);
  background: var(--white);
  font-weight: 750;
}

.drawing-map-pages {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
  gap: 5px;
  padding: 8px;
  border-top: 1px solid var(--line);
  background: var(--panel);
}

.drawing-map-page {
  min-width: 0;
  min-height: 38px;
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink-soft);
  background: var(--white);
  cursor: pointer;
}

.drawing-map-page:hover {
  border-color: var(--selection);
}

.drawing-map-page strong {
  font-size: 0.68rem;
}

.drawing-map-page span {
  min-width: 14px;
  height: 14px;
  position: absolute;
  top: 2px;
  right: 2px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.52rem;
  font-weight: 800;
}

.drawing-map-page.density-low {
  border-color: hsl(24 92% 54% / 0.42);
  background: hsl(29 100% 94% / 0.62);
}

.drawing-map-page.density-medium {
  border-color: hsl(24 92% 54% / 0.68);
  background: hsl(29 100% 90%);
}

.drawing-map-page.density-high {
  border-color: var(--mark-deep);
  color: var(--mark-deep);
  background: var(--mark-soft);
}

.drawing-map-page.has-selected-object {
  outline: 2px solid var(--selection);
  outline-offset: 1px;
}

/* Pages with objects related to the selection, or in the current trace. */
.drawing-map-page.has-related-object::after,
.thumbnail-button.has-related .thumbnail-frame::after {
  content: "";
  position: absolute;
  bottom: 3px;
  left: 3px;
  width: 7px;
  height: 7px;
  border: 1.5px solid var(--white);
  border-radius: 50%;
  background: var(--relation-system);
}

.drawing-map-page[aria-current="page"] {
  border-color: var(--navy);
  color: var(--white);
  background: var(--navy);
}

.drawing-map-page[aria-current="page"] span {
  color: var(--white);
}

.document-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.document-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
}

.document-select,
.document-action {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
  cursor: pointer;
}

.document-select {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  text-align: left;
}

.document-select[aria-current="true"] {
  border-color: var(--selection);
  background: hsl(205 80% 96%);
  box-shadow: inset 3px 0 0 var(--selection);
}

.document-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.document-copy strong,
.document-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-copy strong {
  font-size: 0.75rem;
}

.document-copy small,
.document-state {
  color: var(--ink-soft);
  font-size: 0.63rem;
}

.document-state {
  padding: 4px 6px;
  border-radius: 999px;
  background: var(--panel);
  white-space: nowrap;
}

.document-state.is-missing {
  color: var(--accent2-text);
  background: var(--accent2-dim);
  font-weight: 750;
}

.document-actions {
  display: flex;
  gap: 4px;
}

.document-action {
  min-width: 36px;
  padding: 6px 8px;
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 750;
}

.document-action:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.create-object-form {
  display: grid;
  gap: 6px;
}

.field-label {
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 650;
}

.form-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 7px;
}

.shortcut-help {
  position: relative;
}

.help-button[aria-expanded="true"] {
  border-color: var(--navy-soft);
  color: var(--white);
  background: var(--navy-soft);
}

.shortcut-panel {
  width: min(330px, calc(100vw - 28px));
  max-height: min(640px, calc(100vh - 110px));
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 20;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--white);
  box-shadow: var(--shadow);
  overflow-y: auto;
}

.shortcut-panel[hidden] {
  display: none;
}

.shortcut-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.shortcut-heading h2 {
  margin: 0;
  font-size: 1rem;
}

.shortcut-close {
  width: 31px;
  min-height: 31px;
}

.shortcut-list {
  display: grid;
  gap: 9px;
  margin: 0;
}

.shortcut-list > div {
  display: grid;
  grid-template-columns: minmax(105px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.shortcut-list dt,
.shortcut-list dd {
  margin: 0;
}

.shortcut-list dt {
  color: var(--navy-soft);
  font-size: 0.72rem;
  font-weight: 750;
}

.shortcut-list dd,
.shortcut-panel > p {
  color: var(--ink-soft);
  font-size: 0.74rem;
  line-height: 1.35;
}

.shortcut-panel > p {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

kbd {
  display: inline-block;
  min-width: 24px;
  padding: 2px 5px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  color: var(--ink);
  background: var(--panel);
  font-family: var(--font-mono);
  font-size: 0.67rem;
  text-align: center;
}

.text-input {
  width: 100%;
  min-width: 0;
  min-height: 30px;
  padding: 4px 8px;
  font-size: 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
}

select.text-input {
  cursor: pointer;
}

.link-existing {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.choice-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 0.68rem;
}

.choice-divider::before,
.choice-divider::after {
  height: 1px;
  flex: 1;
  content: "";
  background: var(--line);
}

.section-heading span {
  color: var(--ink-soft);
  font-size: 0.7rem;
  text-transform: uppercase;
}

.quiet-copy {
  color: var(--ink-soft);
  font-size: 0.8rem;
  line-height: 1.45;
}

.object-list,
.object-occurrence-list {
  display: grid;
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.object-card-button {
  width: 100%;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 4px 6px 4px 14px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--ink);
  background: var(--white);
  text-align: left;
  cursor: pointer;
  box-shadow: none;
  transition: border-color 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
}

.object-card-button:hover {
  background: var(--surface-muted);
}

.object-card-button[aria-current="true"] {
  border-color: var(--selection);
  background: hsl(205 80% 97%);
  box-shadow: inset 3px 0 0 var(--selection);
}

.object-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 18px;
  border-radius: 4px;
  color: var(--white);
  background: var(--navy-soft);
  font-size: 0.56rem;
  font-weight: 800;
}

.object-label {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.object-label strong {
  overflow: hidden;
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.object-label small,
.object-count {
  color: var(--ink-soft);
  font-size: 0.68rem;
}

.object-count:empty {
  display: none;
}

.object-count {
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--panel);
  text-align: center;
  white-space: nowrap;
}

.object-card-button[aria-current="true"] .object-icon {
  background: var(--selection);
}

.object-card-button[aria-current="true"] .object-count {
  color: var(--selection);
  background: var(--white);
}

.selected-object-panel,
.unlinked-section,
.sidecar-section {
  margin-top: 16px;
}

.selected-object-panel {
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

.properties-float .selected-object-panel,
.properties-float .object-composer {
  margin-top: 0;
  padding-top: 0;
}

.properties-float .concept-note {
  margin: 0 0 12px;
}

.sidecar-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.section-heading .save-state {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  text-transform: none;
}

.section-heading .save-state[data-dirty="true"] {
  border-color: var(--accent2);
  color: var(--accent2-text);
  background: var(--accent2-dim);
  font-weight: 750;
}

.sidecar-status {
  margin: 10px 0 0;
  padding: 9px 10px;
  border-left: 3px solid hsl(205 78% 40%);
  border-radius: 0 6px 6px 0;
  color: var(--navy-soft);
  background: hsl(205 92% 49% / 0.09);
  font-size: 0.74rem;
  line-height: 1.4;
}

.sidecar-status.is-error {
  border-left-color: hsl(5 62% 48%);
  color: hsl(5 62% 34%);
  background: hsl(5 75% 96%);
}

.selected-object-panel .section-heading {
  align-items: center;
  margin-bottom: 12px;
}

.selected-object-panel .section-heading h3 {
  margin-bottom: 0;
}

.selected-object-panel > .field-label {
  display: block;
  margin-top: 9px;
  margin-bottom: 5px;
}

#selectedObjectIdentity {
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.66rem;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.panel-actions .button {
  min-height: 28px;
  padding: 4px 10px;
  font-size: 0.74rem;
}

.object-lens-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.object-lens-summary span {
  padding: 5px 8px;
  border: 1px solid hsl(205 35% 82%);
  border-radius: 999px;
  color: var(--navy-soft);
  background: var(--white);
  font-size: 0.67rem;
  font-weight: 700;
  line-height: 1.25;
}

.object-lens-summary .object-lens-missing {
  border-color: hsl(28 80% 76%);
  color: var(--accent2-text);
  background: var(--accent2-dim);
}

.revit-properties {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.revit-properties .relation-list {
  display: grid;
  gap: 4px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.relation-row {
  display: grid;
  grid-template-columns: minmax(0, max-content) minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}

.relation-row-phrase {
  min-width: 0;
  max-width: 7.6rem;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  padding: 4px 7px;
  border: 0;
  border-left: 3px solid var(--relation-color);
  border-radius: 4px 7px 7px 4px;
  color: var(--relation-color);
  background: transparent;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
}

.relation-row-phrase:hover {
  background: var(--surface-muted);
}

.relation-row-target {
  display: grid;
  min-width: 0;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.relation-row-target:hover {
  border-color: var(--selection);
}

.relation-row-target strong,
.relation-row-target span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.relation-row-target strong {
  font-size: 0.72rem;
}

.relation-row-target span {
  color: var(--ink-soft);
  font-size: 0.62rem;
}

.relation-row-target span:empty {
  display: none;
}

.relation-row-remove {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 6px;
  color: var(--ink-soft);
  background: transparent;
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}

.relation-row-remove:hover {
  color: var(--danger);
  background: var(--surface-muted);
}

.compact-action[aria-pressed="true"] {
  border-color: var(--relation-system);
  color: var(--white);
  background: var(--relation-system);
}

.revit-relations-action {
  width: 100%;
  margin-top: 8px;
}

#linkOnexus.is-linked {
  border-color: var(--relation-system);
  color: var(--relation-system);
}

.onexus-address {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 0.66rem;
}

.onexus-address summary {
  cursor: pointer;
}

.onexus-address .text-input {
  margin-top: 4px;
  font-size: 0.7rem;
}

#exportTraceOnexus {
  justify-self: end;
}

.trace-panel {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding: 8px;
  border: 1px solid hsl(262 42% 82%);
  border-radius: 9px;
  background: hsl(262 60% 98%);
}

.trace-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 6px;
}

.trace-heading strong {
  overflow: hidden;
  color: var(--relation-system);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trace-steps .text-input {
  min-height: 28px;
  padding: 2px 6px;
  font-size: 0.68rem;
}

.trace-list {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.trace-item {
  width: 100%;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 5px 7px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.trace-item:hover,
.trace-item[aria-current="true"] {
  border-color: var(--relation-system);
}

.trace-step {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--relation-system);
  font-size: 0.62rem;
  font-weight: 800;
}

.trace-copy {
  display: grid;
  min-width: 0;
}

.trace-copy strong,
.trace-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trace-copy strong {
  font-size: 0.72rem;
}

.trace-copy small {
  color: var(--ink-soft);
  font-size: 0.62rem;
}

/* Find places: text hits waiting for a person to link them. */
.places-panel {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--white);
}

.places-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}

.places-heading strong {
  overflow: hidden;
  color: var(--accent);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.places-panel .quiet-copy {
  margin: 0;
}

.places-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.places-chip {
  max-width: 100%;
  overflow: hidden;
  padding: 2px 8px;
  border: 1px dashed var(--accent);
  border-radius: 999px;
  color: var(--accent);
  background: transparent;
  font: inherit;
  font-size: 0.64rem;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.places-list {
  display: grid;
  gap: 3px;
  max-height: 240px;
  overflow-y: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}

.places-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 4px;
}

.places-go {
  min-width: 0;
  display: grid;
  padding: 4px 7px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--ink);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.places-go:hover,
.places-go[aria-current="true"] {
  border-color: var(--accent);
}

.places-go strong,
.places-go small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.places-go strong {
  font-size: 0.72rem;
}

.places-go small {
  color: var(--ink-soft);
  font-size: 0.62rem;
}

.place-candidate {
  fill: transparent;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-dasharray: 4 3;
  vector-effect: non-scaling-stroke;
  cursor: copy;
  pointer-events: auto;
}

.place-candidate:hover,
.place-candidate:focus-visible,
.place-candidate.is-focused {
  stroke-width: 2.5;
  fill: color-mix(in srgb, var(--accent) 12%, transparent);
  outline: none;
}

.relation-side-field {
  display: grid;
  gap: 6px;
}

.relation-side-field[hidden] {
  display: none;
}

.related-data {
  display: grid;
  gap: 8px;
}

.related-data[hidden] {
  display: none;
}

.related-data .subsection-heading {
  margin-bottom: 0;
}

.related-data .quiet-copy {
  margin: 0;
}

.related-data-list {
  display: grid;
  gap: 6px;
}

.related-data-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-left: 3px solid var(--relation-color);
  border-radius: 8px;
  background: var(--white);
}

.related-data-group > summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  cursor: pointer;
}

.related-data-phrase {
  color: var(--relation-color);
  font-size: 0.66rem;
  font-weight: 750;
  white-space: nowrap;
}

.related-data-group > summary strong {
  overflow: hidden;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.related-data-group > summary small {
  color: var(--ink-soft);
  font-size: 0.6rem;
  white-space: nowrap;
}

.related-data-group .quiet-copy,
.related-data-note {
  margin: 0;
  padding: 7px 9px;
  border-top: 1px solid var(--line);
  font-size: 0.68rem;
  line-height: 1.4;
}

.related-data-note {
  color: var(--ink);
  white-space: pre-wrap;
}

.relation-dialog {
  position: fixed;
  z-index: 20;
  inset: 0;
  width: min(380px, calc(100vw - 32px));
  max-width: none;
  margin: auto;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 24px 80px hsl(220 35% 12% / 0.3);
}

.relation-dialog::backdrop {
  background: hsl(218 45% 12% / 0.32);
}

.relation-form {
  display: grid;
  gap: 6px;
  padding: 14px 16px 16px;
}

.relation-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.relation-dialog-header h2 {
  margin: 0;
  font-size: 0.95rem;
}

.relation-sentence {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  margin: 2px 0 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-muted);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

#relationPhrasePreview {
  color: var(--relation-system);
  font-weight: 700;
}

.relation-error {
  margin: 2px 0 0;
  color: var(--danger);
  font-size: 0.72rem;
}

.relation-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 10px;
}

.relation-dialog-actions #swapRelation {
  margin-right: auto;
}

.subsection-heading {
  margin: 0;
}

.revit-identity {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.68rem;
  line-height: 1.45;
}

.revit-property-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.revit-property-group > summary {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 9px;
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 750;
  cursor: pointer;
}

.revit-property-group > summary span {
  color: var(--ink-soft);
  font-weight: 650;
}

.revit-property-list {
  display: grid;
  grid-template-columns: minmax(88px, 0.8fr) minmax(0, 1.2fr);
  margin: 0;
  border-top: 1px solid var(--line);
}

.revit-property-list dt,
.revit-property-list dd {
  min-width: 0;
  margin: 0;
  padding: 7px 9px;
  overflow-wrap: anywhere;
  border-bottom: 1px solid var(--line);
  font-size: 0.68rem;
  line-height: 1.35;
}

.revit-property-list dt {
  color: var(--ink-soft);
  background: var(--surface-muted);
}

.revit-property-list dd {
  color: var(--ink);
}

.revit-property-list > :nth-last-child(-n + 2) {
  border-bottom: 0;
}

.evidence-export {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.object-export-menu {
  position: relative;
  min-width: 0;
}

.object-export-menu > summary {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  list-style: none;
  cursor: pointer;
}

.object-export-menu > summary::-webkit-details-marker {
  display: none;
}

.object-export-menu[open] > summary {
  border-color: var(--selection);
  color: var(--selection);
  background: var(--selection-soft);
}

.object-export-options {
  display: grid;
  gap: 5px;
  margin-top: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--white);
  box-shadow: 0 10px 24px hsl(218 34% 16% / 0.12);
}

.object-export-option {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--ink);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.object-export-option:hover:not(:disabled) {
  border-color: var(--line);
  background: var(--panel);
}

.object-export-option:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.object-export-option strong {
  font-size: 0.7rem;
}

.object-export-option span {
  color: var(--ink-soft);
  font-size: 0.61rem;
  line-height: 1.35;
}

.evidence-export-status {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.67rem;
  line-height: 1.4;
}

.evidence-export-status.is-error {
  color: hsl(5 62% 34%);
}

.danger-button {
  border-color: hsl(5 56% 60%);
  color: hsl(5 64% 40%);
  background: hsl(5 70% 97%);
}

.danger-button:hover:not(:disabled) {
  border-color: hsl(5 67% 47%);
  color: var(--white);
  background: hsl(5 67% 47%);
}

.subsection-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 17px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.subsection-heading h4 {
  margin: 0;
  font-size: 0.76rem;
}

.subsection-heading span {
  color: var(--ink-soft);
  font-size: 0.7rem;
}

.subsection-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.compact-action {
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--selection);
  background: var(--white);
  font: inherit;
  font-size: 0.66rem;
  font-weight: 750;
  cursor: pointer;
}

.compact-action:hover:not(:disabled) {
  border-color: var(--selection);
  background: var(--selection-soft);
}

.compact-action:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.object-occurrence-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
}

.object-lens-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 6px;
  min-width: 0;
}

.occurrence-nav-button.object-lens-preview-button {
  display: block;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  text-align: left;
}

.object-lens-preview {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1.6;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(45deg, hsl(214 18% 91%) 25%, transparent 25%) 0 0 / 12px 12px,
    linear-gradient(45deg, transparent 75%, hsl(214 18% 91%) 75%) 0 0 / 12px 12px,
    linear-gradient(45deg, transparent 75%, hsl(214 18% 91%) 75%) 6px -6px / 12px 12px,
    linear-gradient(45deg, hsl(214 18% 91%) 25%, var(--white) 25%) 6px -6px / 12px 12px;
}

.object-lens-preview canvas,
.object-lens-preview svg {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.object-lens-preview canvas {
  background: var(--white);
}

.object-lens-preview svg {
  pointer-events: none;
}

.object-lens-mark {
  fill: var(--selection-soft);
  stroke: var(--selection);
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.object-lens-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 12px;
  color: var(--ink-soft);
  background: hsl(0 0% 100% / 0.72);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}

.object-lens-preview.is-missing .object-lens-placeholder,
.object-lens-preview.has-error .object-lens-placeholder {
  color: var(--accent2-text);
  background: hsl(29 100% 94% / 0.9);
}

.object-lens-meta {
  position: relative;
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 9px 66px 9px 10px;
  line-height: 1.25;
}

.object-lens-meta strong,
.object-lens-meta small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.object-lens-meta strong {
  font-size: 0.72rem;
}

.object-lens-meta small {
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.62rem;
}

.object-lens-type {
  position: absolute;
  top: 9px;
  right: 8px;
  padding: 3px 6px;
  border-radius: 999px;
  color: var(--selection);
  background: var(--selection-soft);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.object-lens-delete {
  align-self: start;
}

.representation-board {
  width: min(1180px, calc(100vw - 32px));
  max-width: none;
  height: min(820px, calc(100vh - 32px));
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 1px solid hsl(216 20% 68% / 0.75);
  border-radius: 14px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 24px 80px hsl(220 35% 12% / 0.34);
}

.representation-board::backdrop {
  background: hsl(218 45% 12% / 0.7);
  backdrop-filter: blur(3px);
}

.representation-board-shell {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.representation-board-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px 16px;
  color: var(--white);
  background: linear-gradient(120deg, var(--navy), var(--navy-soft));
  border-bottom: 3px solid var(--accent);
}

.representation-board-header h2 {
  margin: 2px 0 4px;
  font-size: 1.2rem;
}

.representation-board-summary {
  margin: 0;
  color: hsl(40 35% 91%);
  font-size: 0.75rem;
  line-height: 1.4;
}

.representation-board-close {
  flex: none;
  border-color: hsl(0 0% 100% / 0.38);
  color: var(--white);
  background: hsl(0 0% 100% / 0.08);
}

.representation-board-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  align-content: start;
  gap: 14px;
  margin: 0;
  padding: 18px;
  overflow: auto;
  list-style: none;
}

.representation-board-card {
  display: block;
  position: relative;
}

.representation-board-card .object-lens-delete {
  position: absolute;
  z-index: 1;
  top: 8px;
  right: 8px;
  background: hsl(0 0% 100% / 0.92);
}

.representation-board-card .object-lens-preview-button {
  width: 100%;
  box-shadow: 0 8px 20px hsl(220 35% 12% / 0.09);
}

.representation-board-card .object-lens-preview {
  aspect-ratio: 1.6;
}

.representation-board-card .object-lens-meta {
  padding-block: 11px;
}

.occurrence-nav-button,
.occurrence-delete-button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: var(--white);
  cursor: pointer;
}

.occurrence-nav-button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  text-align: left;
  transition: border-color 120ms ease, background 120ms ease;
}

.occurrence-nav-button:hover {
  border-color: var(--mark);
  background: var(--mark-soft);
}

.occurrence-nav-button[aria-current="true"] {
  border-color: var(--selection);
  background: hsl(205 80% 96%);
  box-shadow: inset 3px 0 0 var(--selection);
}

.occurrence-index {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: var(--ink-soft);
  background: var(--panel);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 750;
}

.occurrence-details {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.occurrence-details strong {
  font-size: 0.75rem;
}

.occurrence-details small {
  overflow: hidden;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.occurrence-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink-soft);
  font-size: 0.62rem;
}

.occurrence-status::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mark);
  content: "";
}

.occurrence-status.is-unlinked::before {
  background: var(--line-strong);
}

.occurrence-delete-button {
  width: 34px;
  color: hsl(5 64% 40%);
}

.unlinked-section {
  padding-bottom: 24px;
}

@media (min-width: 901px) and (max-width: 1320px) {
  .toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .toolbar-actions {
    grid-column: 2;
    grid-row: 1;
  }

  .toolbar-navigation {
    grid-column: 1 / -1;
  }

  .panel-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  .app-header {
    position: sticky;
    top: 0;
    z-index: 10;
  }

  .document-name {
    display: none;
  }

  .app-shell {
    height: auto;
    min-height: calc(100% - 40px);
    grid-template-columns: 1fr;
  }

  .side-panel {
    display: block;
    overflow: visible;
  }

  .panel-pane {
    overflow: visible;
  }

  /* On small screens Properties docks to the bottom of the drawing. */
  .properties-float {
    justify-self: stretch;
    align-self: end;
    width: auto;
    max-height: 55%;
    transform: none;
  }

  .float-heading {
    cursor: default;
  }

  .thumbnail-panel {
    width: 104px;
  }

  .thumbnail-frame {
    width: 76px;
  }

  .workspace {
    min-height: 72vh;
  }

  .toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .toolbar-actions {
    grid-column: 2;
    grid-row: 1;
  }

  .toolbar-navigation {
    grid-column: 1 / -1;
  }

  .viewer-stage {
    min-height: 56vh;
    padding: 18px;
  }

  .side-panel {
    overflow: visible;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 560px) {
  .app-header {
    height: 40px;
    padding-inline: 12px;
  }

  .app-shell {
    min-height: calc(100% - 40px);
  }

  .toolbar {
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    padding: 8px;
  }

  .file-button,
  .toolbar-actions {
    width: 100%;
  }

  .toolbar-actions {
    gap: 4px;
  }

  .toolbar-actions .shape-tool {
    min-width: 0;
    flex: 1 1 86px;
  }

  .toolbar-actions .shape-tool select {
    width: 100%;
    min-width: 0;
  }

  .toolbar-actions > .button {
    padding-inline: 8px;
  }

  .toolbar-actions .mark-button {
    min-width: 0;
    flex: 1 1 auto;
  }

  .toolbar-navigation {
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 7px;
  }

  .toolbar-divider {
    display: none;
  }

  .control-group {
    gap: 4px;
  }

  .page-count,
  .zoom-value {
    min-width: 28px;
  }

  .status-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .empty-state {
    padding: 28px 20px;
  }

  .selected-object-panel .panel-actions {
    grid-template-columns: 1fr;
  }

  .notes-dialog,
  .drawing-map-dialog,
  .representation-board {
    width: calc(100vw - 16px);
    height: calc(100vh - 16px);
    border-radius: 10px;
  }

  .drawing-map-dialog-header,
  .notes-dialog-header,
  .note-form,
  .notes-list,
  .drawing-map-dialog > .drawing-map-dialog-shell > .drawing-map,
  .representation-board-header,
  .representation-board-grid {
    padding-inline: 12px;
  }
}

@media (max-width: 420px) {
  .toolbar {
    grid-template-columns: 1fr;
  }

  .toolbar-actions {
    grid-column: 1;
    grid-row: 2;
  }

  .toolbar-navigation {
    grid-column: 1;
    display: grid;
    grid-template-columns: 1fr;
  }

  .toolbar-navigation > .control-group {
    width: 100%;
    min-width: 0;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .toolbar-navigation > .history-controls {
    justify-content: center;
  }

  .side-panel {
    padding-inline: 16px;
  }

  .note-form {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
