:root {
  --hl-bg: #f1d98d;
  --hl-fg: #2a2007;
  --hl-edge: #8a6a1c;
  --hl-bar-bg: #fffefa;
  --hl-bar-fg: #243d33;
  --hl-bar-line: #798378;
  --hl-focus: #663e1b;
  --hl-action-bg: #214d40;
  --hl-action-fg: #fffefa;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --hl-bg: #6e5723;
    --hl-fg: #fff4d2;
    --hl-edge: #d1bd83;
    --hl-bar-bg: #1e2921;
    --hl-bar-fg: #e3ebdd;
    --hl-bar-line: #819782;
    --hl-focus: #ffdda0;
    --hl-action-bg: #abd5ad;
    --hl-action-fg: #13271b;
  }
}
:root[data-theme="dark"] {
  --hl-bg: #6e5723;
  --hl-fg: #fff4d2;
  --hl-edge: #d1bd83;
  --hl-bar-bg: #1e2921;
  --hl-bar-fg: #e3ebdd;
  --hl-bar-line: #819782;
  --hl-focus: #ffdda0;
  --hl-action-bg: #abd5ad;
  --hl-action-fg: #13271b;
}

.verified-highlight,
[data-hl-verified="true"] {
  background: var(--hl-bg);
  color: var(--hl-fg);
  box-shadow: 0 1px 0 var(--hl-edge);
  border-radius: 2px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.hl-copy-fallback {
  position: fixed;
  inset-block-start: 0;
  inset-inline-start: 0;
  opacity: 0;
}
.hl-bar {
  display: none;
}
.hl-bar[popover] {
  position: fixed;
  inset: auto;
  margin: 0;
  padding: 6px 8px;
  overflow: visible;
  box-sizing: border-box;
  max-inline-size: calc(100vw - 16px);
  border: 1px solid var(--hl-bar-line);
  border-radius: 6px;
  background: var(--hl-bar-bg);
  color: var(--hl-bar-fg);
  box-shadow: 0 6px 24px rgb(0 0 0 / 0.22);
  font: 0.875rem/1.3 system-ui, sans-serif;
  z-index: 40;
}
.hl-bar[popover]:is(:popover-open, .\:popover-open) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
}
.hl-bar [hidden] {
  display: none;
}
.hl-bar :is(button, a) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-inline-size: 24px;
  min-block-size: 24px;
  padding: 4px 10px;
  border: 1px solid var(--hl-bar-line);
  border-radius: 4px;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}
.hl-copy {
  background: var(--hl-action-bg);
  color: var(--hl-action-fg);
}
.hl-calc {
  background: transparent;
  color: var(--hl-bar-fg);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.hl-bar :is(button, a):focus-visible {
  outline: 3px solid var(--hl-focus);
  outline-offset: 2px;
}
.hl-value {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.hl-status {
  flex-basis: 100%;
  min-block-size: 1.3em;
  opacity: 0;
  transition: opacity 0.15s;
}
.hl-status:not(:empty) {
  opacity: 1;
}
@media (pointer: coarse) {
  .hl-bar :is(button, a) {
    min-inline-size: 44px;
    min-block-size: 44px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hl-status {
    transition: none;
  }
}
@media (forced-colors: active) {
  .verified-highlight,
  [data-hl-verified="true"] {
    background: Mark;
    color: MarkText;
    box-shadow: none;
    forced-color-adjust: none;
  }
  .hl-bar[popover] {
    border-color: CanvasText;
    background: Canvas;
    color: CanvasText;
    box-shadow: none;
  }
  .hl-bar :is(button, a) {
    border-color: ButtonText;
    background: ButtonFace;
    color: ButtonText;
  }
  .hl-bar :is(button, a):focus-visible {
    outline-color: Highlight;
  }
}
