.workspace-select {
  min-width: 148px;
  max-width: 260px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 30px 0 10px;
  font: inherit;
  font-weight: 650;
  letter-spacing: 0;
}

.sentence-mode[hidden] {
  display: none;
}

.workspace-select:focus-visible,
.coverage-back:focus-visible,
.coverage-crumb:focus-visible,
.detached-piece:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--np) 25%, transparent);
  outline-offset: 2px;
}

.coverage-lab {
  min-width: 0;
  border-block: 1px solid var(--line);
  background: var(--surface);
}

.coverage-toolbar {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  min-height: 94px;
  padding: 14px 0;
}

.coverage-back {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: 21px;
  cursor: pointer;
}

.coverage-back:disabled {
  opacity: 0.32;
  cursor: default;
}

.coverage-context {
  min-width: 0;
}

.coverage-path {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  overflow-x: auto;
  scrollbar-width: thin;
  white-space: nowrap;
}

.coverage-crumb {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 3px 2px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.coverage-crumb[aria-current="page"] {
  color: var(--ink);
}

.coverage-crumb-separator {
  color: #a1aab4;
  font-size: 11px;
}

.coverage-sentence {
  margin: 4px 0 0;
  color: #475462;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  line-height: 1.55;
}

.coverage-translation {
  margin: 5px 0 0;
  color: #687482;
  font-size: 13px;
  line-height: 1.55;
}

.coverage-translation[hidden] {
  display: none;
}

.coverage-fixed-constructions {
  position: relative;
  width: 100%;
  min-height: 44px;
  overflow: hidden;
  padding: 0;
  border-top: 1px solid var(--line);
}

.coverage-fixed-constructions[hidden] {
  display: none;
}

.coverage-fixed-construction {
  position: absolute;
  top: var(--construction-top, 7px);
  left: var(--construction-left, 0);
  width: var(--construction-width, 164px);
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--construction-color, #008f83);
  cursor: pointer;
  transform: translateX(calc(-1 * var(--coverage-scroll-left, 0px)));
}

.coverage-fixed-construction svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.coverage-fixed-construction path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-dasharray: 3 5;
  stroke-linecap: round;
}

.coverage-fixed-construction circle {
  fill: currentColor;
  stroke: var(--surface);
  stroke-width: 2;
}

.coverage-fixed-construction circle.is-external {
  fill: var(--surface);
  stroke: currentColor;
  stroke-width: 2.5;
}

.coverage-fixed-construction .construction-label-background {
  fill: color-mix(
    in srgb,
    var(--focus-color, var(--clause)) 2.5%,
    var(--surface)
  );
  stroke: none;
}

.coverage-fixed-construction text {
  fill: currentColor;
  stroke: none;
  font-family: system-ui, sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-anchor: middle;
  dominant-baseline: middle;
}

.coverage-fixed-construction:hover path,
.coverage-fixed-construction:focus-visible path,
.coverage-fixed-construction[aria-expanded="true"] path {
  stroke-width: 2.6;
}

.coverage-fixed-construction:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.coverage-sentence-highlight,
.sentence-token.is-highlighted {
  background: color-mix(in srgb, var(--sentence-accent, var(--np)) 9%, transparent);
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: var(--sentence-accent, var(--np));
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
  text-decoration-skip-ink: none;
}

.sentence-token.is-highlighted.np {
  --sentence-accent: var(--np);
}

.sentence-token.is-highlighted.vp,
.sentence-token.is-highlighted.v-base,
.sentence-token.is-highlighted.v-ing,
.sentence-token.is-highlighted.v-en {
  --sentence-accent: var(--vp);
}

.sentence-token.is-highlighted.ap {
  --sentence-accent: var(--ap);
}

.sentence-token.is-highlighted.pp {
  --sentence-accent: var(--pp);
}

.sentence-token.is-highlighted.clause {
  --sentence-accent: var(--clause);
}

.sentence-token.is-highlighted.wh,
.sentence-token.is-highlighted.corr {
  --sentence-accent: var(--adv);
}

.sentence-token.is-highlighted.aux-fin,
.sentence-token.is-highlighted.aux-perfect {
  --sentence-accent: var(--aux-fin);
}

.coverage-stage {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(#eef1f4 1px, transparent 1px) 0 104px / 100% 1px no-repeat,
    #fbfcfd;
  border-block: 1px solid var(--line);
  padding: 30px 0 32px;
}

.coverage-shell {
  --focus-color: var(--clause);
  position: relative;
  min-height: 214px;
  border: 1px solid color-mix(in srgb, var(--focus-color) 38%, var(--line));
  border-left: 3px solid var(--focus-color);
  background: color-mix(in srgb, var(--focus-color) 2.5%, var(--surface));
}

.coverage-shell::before,
.coverage-shell::after {
  display: none;
}

.coverage-shell[data-category="NP"] {
  --focus-color: var(--np);
}

.coverage-shell[data-category="VP"],
.coverage-shell[data-category="V"] {
  --focus-color: var(--vp);
}

.coverage-shell[data-category="PP"] {
  --focus-color: var(--pp);
}

.coverage-shell[data-category="AP"] {
  --focus-color: var(--ap);
}

.coverage-shell[data-category="CLAUSE"],
.coverage-shell[data-category="S"] {
  --focus-color: var(--clause);
  background-color: #fcfbff;
}

.coverage-shell[data-category="CLAUSE"][data-kind="relative-clause"] {
  --focus-color: #4774b8;
}

.coverage-shell[data-category="CLAUSE"][data-kind="adverbial-clause"],
.coverage-shell[data-category="CLAUSE"][data-kind="time-clause"] {
  --focus-color: #3f8067;
}

.coverage-shell[data-category="CLAUSE"][data-kind="conditional-clause"] {
  --focus-color: #a66b19;
}

.coverage-shell[data-category="CLAUSE"][data-kind="embedded-question"],
.coverage-shell[data-category="CLAUSE"][data-kind="wh-question"] {
  --focus-color: #94547f;
}

.coverage-shell[data-category="ABS"] {
  --focus-color: #536db0;
}

.coverage-shell[data-category="PARADIGM"] {
  --focus-color: #536db0;
}

.coverage-shell[data-category="CLASSSET"] {
  --focus-color: #58717d;
}

.coverage-shell[data-category="TAG"] {
  --focus-color: #aa4963;
}

.coverage-shell[data-category="CORR"] {
  --focus-color: #8f4e2d;
}

.coverage-shell[data-category="AUX"],
.coverage-shell[data-category="MODAL"] {
  --focus-color: var(--aux-fin);
}

.coverage-shell-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  min-height: 62px;
  padding: 12px 18px 10px 22px;
  color: var(--muted);
}

.coverage-shell-title {
  min-width: 0;
  flex: 1 1 auto;
}

.coverage-shell-head strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.3;
}

.coverage-shell-head span {
  font-size: 12px;
  font-weight: 700;
}

.coverage-shell-summary {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 7px;
  margin-top: 2px;
}

.coverage-shell-summary > span:not(:empty)::after {
  content: "·";
  margin-left: 7px;
  color: #9aa5af;
}

.coverage-shell-taxonomy {
  display: flex;
  min-width: 0;
  max-width: 58%;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.coverage-focus-type {
  flex: 0 0 auto;
  color: var(--focus-color, var(--clause));
  text-transform: uppercase;
}

.coverage-row-wrap {
  width: 100%;
  min-height: 142px;
  overflow-x: auto;
  overflow-y: hidden;
  outline: none;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.coverage-row-wrap:focus-visible {
  box-shadow: inset 0 0 0 2px
    color-mix(in srgb, var(--focus-color, var(--clause)) 28%, transparent);
}

.coverage-row-wrap::-webkit-scrollbar {
  display: none;
}

.coverage-scroll-control {
  height: 22px;
  padding: 1px 22px 7px;
  border-top: 1px solid #e1e6ea;
  background: #f4f7f9;
}

.coverage-scroll-control[hidden] {
  display: none;
}

.coverage-scroll-range {
  display: block;
  width: 100%;
  height: 14px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: ew-resize;
}

.coverage-scroll-range:focus-visible {
  outline: 2px solid
    color-mix(in srgb, var(--focus-color, var(--clause)) 42%, transparent);
  outline-offset: 2px;
}

.coverage-scroll-range::-webkit-slider-runnable-track {
  height: 7px;
  border: 1px solid #d2dae0;
  border-radius: 4px;
  background: #e4e9ed;
}

.coverage-scroll-range::-webkit-slider-thumb {
  width: var(--scroll-thumb-width, 72px);
  height: 11px;
  margin-top: -3px;
  appearance: none;
  border: 2px solid #f4f7f9;
  border-radius: 5px;
  background:
    color-mix(in srgb, var(--focus-color, var(--clause)) 68%, #65727d);
}

.coverage-scroll-range::-moz-range-track {
  height: 7px;
  border: 1px solid #d2dae0;
  border-radius: 4px;
  background: #e4e9ed;
}

.coverage-scroll-range::-moz-range-thumb {
  width: var(--scroll-thumb-width, 72px);
  height: 11px;
  border: 2px solid #f4f7f9;
  border-radius: 5px;
  background:
    color-mix(in srgb, var(--focus-color, var(--clause)) 68%, #65727d);
}

#coverageRow {
  display: block;
  width: 100%;
  min-width: 720px;
  height: 142px;
  overflow: visible;
}

.coverage-node {
  cursor: pointer;
}

.coverage-bare-symbol .symbol-glyph {
  fill: #25313c;
  font-size: 24px;
  font-weight: 750;
  dominant-baseline: middle;
  pointer-events: none;
  user-select: none;
}

.coverage-bare-symbol.is-punctuation .symbol-glyph {
  font-size: 22px;
}

.coverage-bare-symbol.is-inline-punctuation .symbol-glyph {
  fill: #667482;
  font-size: 18px;
  font-weight: 800;
}

.coverage-node .node-surface-lighting {
  pointer-events: none;
}

.coverage-node text,
.coverage-slot text {
  pointer-events: none;
  user-select: none;
}

.coverage-node .node-label {
  fill: #17212b;
  font-size: 16px;
  font-weight: 750;
}

.coverage-node .node-class {
  fill: #4f5d69;
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}

.coverage-node .node-function {
  fill: #4d5966;
  font-size: 9px;
  font-weight: 700;
}

.coverage-node.is-punctuation {
  cursor: default;
}

.coverage-node.is-punctuation .node-label {
  font-size: 22px;
}

.coverage-node.is-selected .node-selection {
  fill: none;
  stroke: #17212b;
  stroke-width: 2.5;
}

.coverage-node.is-clause-container .node-label {
  font-size: 15px;
  font-weight: 720;
}

.clause-pattern-overlay {
  opacity: 0.42;
  pointer-events: none;
}

.coverage-assembly-outline {
  fill: none;
  stroke: #8995a1;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.52;
  filter: drop-shadow(0 2px 1.2px rgb(34 53 68 / 0.16));
  pointer-events: none;
}

.coverage-assembly-outline.is-standalone {
  opacity: 0.64;
}

.coverage-connected-seam {
  fill: none;
  stroke: #ffffff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.98;
  filter: drop-shadow(0.6px 0 0.45px rgb(63 75 88 / 0.28));
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.coverage-slot {
  cursor: pointer;
}

.coverage-slot .slot-body {
  fill: #e4e9ed;
  stroke: #687482;
  stroke-width: 2;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 1.2px rgb(34 53 68 / 0.16));
}

.coverage-slot.is-selected .slot-body {
  fill: #eef4ff;
  stroke: var(--np);
  stroke-width: 3;
}

.coverage-slot .slot-title {
  fill: #28343f;
  font-size: 12px;
  font-weight: 800;
}

.coverage-slot .slot-role {
  fill: #62707e;
  font-size: 10px;
  font-weight: 700;
}

.coverage-feature-strip {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
}

.coverage-feature {
  display: inline-flex;
  min-height: 24px;
  flex: 0 0 auto;
  align-items: center;
  border: 1px solid #d4dbe2;
  border-radius: 4px;
  background: #f7f9fa;
  color: #465360;
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 700;
}

.coverage-selection {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.coverage-selection strong {
  display: inline;
  margin-right: 5px;
  color: var(--ink);
  font-size: 12px;
}

.detached-tray {
  padding: 14px 0 4px;
}

.detached-title {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.detached-items {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.detached-piece {
  position: relative;
  flex: 0 0 190px;
  height: 76px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.detached-piece:disabled {
  cursor: not-allowed;
  filter: grayscale(0.8);
  opacity: 0.42;
}

.detached-piece svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.detached-piece text {
  pointer-events: none;
}

.detached-piece-label {
  fill: #17212b;
  font-size: 14px;
  font-weight: 750;
}

.detached-piece-type {
  fill: #5b6875;
  font-size: 9px;
  font-weight: 750;
}

@media (max-width: 900px) {
  .top-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .workspace-select {
    max-width: 210px;
  }

  .coverage-shell-taxonomy {
    max-width: 52%;
  }
}

@media (max-width: 700px) {
  .topbar {
    flex-direction: column;
  }

  .top-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .workspace-select {
    width: min(100%, 250px);
  }

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

  .coverage-toolbar > .reset {
    grid-column: 2;
    justify-self: start;
  }

  .coverage-sentence {
    font-size: 14px;
  }

  .coverage-stage {
    margin-inline: 0;
    padding-inline: 0;
  }

  .coverage-shell {
    min-height: 216px;
  }

  .coverage-shell-head {
    min-height: 88px;
    flex-direction: column;
    justify-content: flex-start;
    gap: 8px;
  }

  .coverage-shell-head strong {
    max-width: 100%;
    font-size: 15px;
    line-height: 1.25;
  }

  .coverage-focus-type {
    flex: 0 0 auto;
  }

  .coverage-shell-taxonomy {
    width: 100%;
    max-width: none;
    justify-content: flex-start;
  }

  .coverage-feature-strip {
    flex: 1 1 auto;
  }

  #coverageRow {
    min-width: 680px;
  }
}

@media (max-width: 430px) {
  .sentence-mode {
    order: 3;
    width: 100%;
  }

  .mode-option {
    flex: 1 1 0;
    padding-inline: 6px;
    font-size: 12px;
  }

  .coverage-shell-head {
    padding-inline: 18px 10px;
  }
}
