*, *::before, *::after {
  box-sizing: border-box;
}

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

body {
  overflow: auto;
  background: #050605;
  color: var(--c-text, #e2e2d3);
}

.mws-shell {
  --f-display: "Wallpoet", ui-sans-serif, system-ui, sans-serif;
  --f-body: "Saira Stencil One", ui-sans-serif, system-ui, sans-serif;
  --f-content: "Special Elite", ui-serif, Georgia, serif;
  --f-mono: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-display-34: 28.825px;
  --font-display-21: 21.591px;
  --font-body-21: 21.591px;
  --font-body-13: 13.792px;
  --font-mono-8: 9.025px;
  --font-mono-13: 13.792px;
  position: relative;
  width: 100vw;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 144px minmax(0, 1fr) 55px;
  gap: 13px;
  padding: 13px;
  overflow: visible;
  font-family: var(--f-body);
  letter-spacing: 0;
}

.mws-topbar,
.mws-main,
.mws-footer,
.mws-login-panel {
  position: relative;
  z-index: 1;
}

.mws-topbar {
  display: grid;
  grid-template-columns: 610px minmax(0, 1fr) 233px;
  gap: 13px;
  min-width: 0;
}

.mws-brand,
.mws-user,
.mws-primary-link,
.mws-main,
.mws-footer,
.mws-login-panel {
  border: 1px solid var(--c-border, rgba(126,132,112,.24));
  border-radius: 8px;
  box-shadow: var(--shadow-tile, 0 0 21px rgba(0,0,0,.48));
}

.mws-brand,
.mws-user,
.mws-primary-link,
.mws-login-panel {
  background:
    linear-gradient(var(--c-control, transparent), var(--c-control, transparent)),
    var(--c-surface-layer-1, rgba(25,28,24,.78));
}

.mws-brand {
  display: grid;
  grid-template-columns: 89px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  padding: 13px;
  min-width: 0;
}

.mws-brand-mark {
  width: 55px;
  height: 55px;
  display: grid;
  place-items: center;
  border: 1px solid var(--c-border-hi, rgba(184,190,158,.66));
  border-radius: 8px;
  color: var(--c-accent, #b8be9e);
  font-family: var(--f-display);
  font-size: var(--font-display-21);
}

.mws-brand-text {
  min-width: 0;
}

.mws-brand-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--c-text, #e2e2d3);
  font-family: var(--f-display);
  font-size: var(--font-display-21);
}

.mws-brand-sub,
.mws-user-role,
.mws-footer,
.mws-login-kicker,
.mws-login-meta {
  color: var(--c-muted, #a9ad96);
  font-family: var(--f-mono);
  font-size: var(--font-mono-8);
  text-transform: uppercase;
}

.mws-primary-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(89px, 1fr));
  gap: 8px;
  min-width: 0;
}

.mws-primary-link {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 13px 8px;
  color: var(--c-muted, #a9ad96);
  text-decoration: none;
}

button.mws-primary-link {
  appearance: none;
  border-color: var(--c-border, rgba(126,132,112,.24));
  cursor: pointer;
}

.mws-primary-link.is-muted {
  opacity: .72;
}

.mws-primary-link.is-active,
.mws-primary-link:hover {
  color: var(--c-text, #e2e2d3);
  border-color: var(--c-border-hi, rgba(184,190,158,.66));
  box-shadow: var(--glow-accent, 0 0 13px rgba(184,190,158,.28));
}

.mws-primary-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 55px;
  color: var(--c-accent, #b8be9e);
  font-family: var(--f-display);
  font-size: var(--font-display-21);
}

.mws-primary-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--f-display);
  font-size: var(--font-display-21);
}

.mws-user {
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 13px;
  min-width: 0;
  overflow: hidden;
}

.mws-user-mail,
.mws-user a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--c-text, #e2e2d3);
  font-family: var(--f-content);
  font-size: var(--font-body-13);
}

.mws-user a {
  color: var(--c-accent, #b8be9e);
  text-decoration: none;
}

.mws-main {
  min-height: 0;
  background:
    linear-gradient(var(--c-content, transparent), var(--c-content, transparent)),
    var(--c-panel, rgba(13,15,13,.88));
  overflow: auto;
}

.mws-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 13px;
  background:
    linear-gradient(var(--c-control, transparent), var(--c-control, transparent)),
    var(--c-surface-layer-1, rgba(25,28,24,.78));
}

.mws-login-shell {
  grid-template-rows: 144px minmax(0, 1fr);
}

.mws-login-panel {
  place-self: center;
  width: 377px;
  min-height: 233px;
  display: grid;
  align-content: center;
  gap: 21px;
  padding: 34px;
  text-align: center;
}

.mws-login-panel h1 {
  margin: 0;
  color: var(--c-text, #e2e2d3);
  font-family: var(--f-display);
  font-size: var(--font-display-34);
  font-weight: 400;
}

.mws-login-action,
.mws-login-warning {
  min-height: 55px;
  display: grid;
  place-items: center;
  border: 1px solid var(--c-border-hi, rgba(184,190,158,.66));
  border-radius: 8px;
  color: var(--c-text, #e2e2d3);
  background: var(--c-accent-dim, rgba(184,190,158,.2));
  font-family: var(--f-body);
  font-size: var(--font-body-21);
  text-decoration: none;
}

.mws-login-warning {
  color: var(--c-warn, #c88d31);
}

.mws-login-meta {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.mws-login-meta code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--c-muted, #a9ad96);
  font-family: var(--f-mono);
  font-size: var(--font-mono-8);
}

.mws-view {
  width: 100%;
  min-height: 100%;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 89px minmax(0, 1fr);
  gap: 13px;
  padding: 13px;
  overflow: visible;
}

.mws-view.is-loading,
.mws-view.is-error {
  place-items: center;
  color: var(--c-muted, #a9ad96);
  font-family: var(--f-content);
  font-size: var(--font-body-13);
}

.mws-view-header {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(233px, 377px) minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  border: 1px solid var(--c-border, rgba(126,132,112,.24));
  border-radius: 8px;
  padding: 13px;
  background:
    linear-gradient(var(--c-control, transparent), var(--c-control, transparent)),
    var(--c-surface-layer-1, rgba(25,28,24,.78));
}

.mws-view-header p,
.mws-view-header h1,
.mws-view-header span {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mws-view-header p {
  color: var(--c-muted, #a9ad96);
  font-family: var(--f-mono);
  font-size: var(--font-mono-8);
  text-transform: uppercase;
}

.mws-view-header h1 {
  color: var(--c-text, #e2e2d3);
  font-family: var(--f-display);
  font-size: var(--font-display-21);
  font-weight: 400;
}

.mws-view-header span {
  color: var(--c-muted, #a9ad96);
  font-family: var(--f-content);
  font-size: var(--font-body-13);
}

.mws-stat-row,
.mws-record-grid {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(144px, 1fr));
  gap: 8px;
  overflow: hidden;
}

.mws-stat,
.mws-record {
  min-width: 0;
  min-height: 55px;
  display: grid;
  align-content: center;
  gap: 5px;
  border: 1px solid var(--c-border, rgba(126,132,112,.24));
  border-radius: 8px;
  padding: 8px;
  background: var(--c-surface-layer-1, rgba(25,28,24,.78));
}

.mws-stat strong,
.mws-record strong {
  color: var(--c-text, #e2e2d3);
  font-family: var(--f-display);
  font-size: var(--font-display-21);
  font-weight: 400;
}

.mws-stat span,
.mws-record span,
.mws-record small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--c-muted, #a9ad96);
  font-family: var(--f-mono);
  font-size: var(--font-mono-8);
}

.mrg-grid-view {
  grid-template-rows: 55px auto auto;
  align-content: start;
}

.mrg-grid-controls {
  min-height: 55px;
  grid-template-columns: 377px minmax(0, 1fr);
  padding-block: 8px;
}

.mrg-grid-shell {
  --grid-columns: 55px repeat(17, minmax(0, 1fr));
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: var(--grid-columns);
  grid-auto-rows: 21px;
  gap: 5px;
  align-content: start;
  overflow: visible;
}

.mrg-grid-row {
  display: contents;
}

.mrg-grid-corner,
.mrg-grid-colhead,
.mrg-grid-rowhead,
.mrg-grid-cell {
  min-width: 0;
  min-height: 21px;
  display: grid;
  place-items: center;
  border: 1px solid var(--c-border, rgba(126,132,112,.24));
  border-radius: 5px;
  overflow: hidden;
  background: rgba(8, 10, 8, .72);
}

.mrg-grid-cell {
  position: relative;
}

button.mrg-grid-cell {
  appearance: none;
  padding: 0;
  cursor: pointer;
}

.mrg-solver-panel {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: 377px 233px minmax(0, 1fr);
  grid-template-rows: 34px minmax(21px, auto) minmax(21px, auto);
  gap: 5px 13px;
  align-content: center;
  border: 1px solid var(--c-border, rgba(126,132,112,.24));
  border-radius: 8px;
  padding: 8px 13px;
  background:
    linear-gradient(var(--c-content, transparent), var(--c-content, transparent)),
    rgba(8, 10, 8, .72);
  overflow: auto;
}

.mrg-solver-form {
  grid-column: 1 / -1;
  min-width: 0;
  display: grid;
  grid-template-columns: 89px minmax(233px, 377px) 89px;
  gap: 8px;
  align-items: center;
}

.mrg-solver-forms {
  grid-column: 1 / -1;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 13px;
}

.mrg-solver-forms .mrg-solver-form {
  grid-column: auto;
  grid-template-columns: 55px minmax(89px, 1fr) 55px;
}

.mrg-solver-form label {
  color: var(--c-muted, #a9ad96);
  font-family: var(--f-mono);
  font-size: var(--font-mono-8);
}

.mrg-solver-form input,
.mrg-solver-form button {
  min-width: 0;
  height: 34px;
  border: 1px solid var(--c-border, rgba(126,132,112,.24));
  border-radius: 8px;
  background: rgba(6, 8, 6, .72);
  color: var(--c-text, #eef0df);
  font-family: var(--f-mono);
  font-size: var(--font-body-13);
}

.mrg-solver-form input {
  padding: 0 13px;
}

.mrg-solver-form button {
  cursor: pointer;
}

.mrg-solver-panel strong,
.mrg-solver-panel code {
  color: var(--c-accent, #b8be9e);
  font-family: var(--f-display);
  font-size: var(--font-body-13);
  font-weight: 400;
}

.mrg-solver-panel span,
.mrg-solver-panel li {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--c-muted, #a9ad96);
  font-family: var(--f-mono);
  font-size: var(--font-mono-8);
}

.mrg-solver-panel ol,
.mrg-solver-relations {
  min-width: 0;
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.mrg-solver-panel ol {
  grid-column: 1 / -1;
  max-height: 89px;
  list-style: none;
  flex-wrap: wrap;
  overflow: auto;
}

.mrg-solver-panel li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 5px;
  min-width: 144px;
}

.mrg-solver-tree {
  align-content: flex-start;
}

.mrg-solver-tree li {
  grid-template-columns: minmax(144px, auto) minmax(0, 1fr);
}

.mrg-solver-tree ol {
  grid-column: 1 / -1;
  margin-left: 13px;
  padding-left: 13px;
  border-left: 1px solid var(--c-border, rgba(126,132,112,.24));
}

.mrg-tree-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 7px;
  align-items: center;
  min-width: 0;
}

.mrg-tree-meta b,
.mrg-tree-meta em,
.mrg-tree-meta small {
  border: 1px solid var(--c-border, rgba(126,132,112,.24));
  border-radius: 999px;
  padding: 1px 6px;
  font-size: 11px;
  line-height: 1.55;
  font-style: normal;
  background: rgba(255,255,255,.04);
}

.mrg-tree-meta small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mrg-solver-flat {
  grid-column: 1 / -1;
}

.mrg-copy-box {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
  min-width: 0;
}

.mrg-copy-box button {
  border: 1px solid var(--c-border, rgba(126,132,112,.24));
  border-radius: 8px;
  padding: 6px 10px;
  color: var(--c-text, #f2f0df);
  background: rgba(255,255,255,.06);
  font-family: var(--f-mono);
  font-size: var(--font-mono-8);
  cursor: pointer;
}

.mrg-copy-box textarea {
  min-width: 0;
  min-height: 89px;
  max-height: 233px;
  resize: vertical;
  border: 1px solid var(--c-border, rgba(126,132,112,.24));
  border-radius: 8px;
  padding: 7px 9px;
  color: var(--c-text, #f2f0df);
  background: rgba(6, 8, 6, .62);
  font-family: var(--f-mono);
  font-size: var(--font-mono-8);
  line-height: 1.45;
  white-space: pre;
}

.mrg-candela-panel {
  grid-column: 1 / -1;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(177px, 288px) minmax(0, 1fr);
  gap: 8px 13px;
  align-items: start;
  border: 1px solid rgba(210, 190, 122, .26);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(210, 190, 122, .055);
}

.mrg-candela-panel div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.mrg-candela-panel ol {
  max-height: 76px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(233px, 1fr));
  gap: 5px 8px;
  overflow: auto;
}

.mrg-candela-panel li {
  min-width: 0;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 6px;
}

.mrg-colorized-path {
  position: relative;
  display: grid;
  grid-template-columns: 12px 76px minmax(0, 1fr);
  gap: 6px;
  align-items: start;
  border-left: 3px solid color-mix(in srgb, var(--mrg-path-color, var(--c-accent, #b8be9e)) 82%, transparent);
  padding-left: 6px;
  background:
    linear-gradient(90deg,
      color-mix(in srgb, var(--mrg-path-color, var(--c-accent, #b8be9e)) 18%, transparent),
      transparent 62%);
}

.mrg-colorized-path i {
  width: 10px;
  height: 10px;
  align-self: center;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--mrg-path-color, var(--c-accent, #b8be9e)) 72%, white);
  background: var(--mrg-path-color, var(--c-accent, #b8be9e));
  box-shadow: 0 0 10px color-mix(in srgb, var(--mrg-path-color, var(--c-accent, #b8be9e)) 64%, transparent);
  opacity: var(--mrg-path-alpha, .42);
}

.mrg-comma-bridge-grid {
  grid-column: 1 / -1;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 13px;
}

.mrg-comma-side {
  min-width: 0;
  display: grid;
  gap: 6px;
  border: 1px solid var(--c-border, rgba(126,132,112,.24));
  border-radius: 8px;
  padding: 8px;
  background: rgba(6, 8, 6, .44);
}

.mrg-comma-side .mrg-solver-tree {
  max-height: 144px;
}

.mrg-comma-bridge-graph {
  grid-column: 1 / -1;
  min-width: 0;
  display: grid;
  gap: 6px;
  border: 1px solid var(--c-border, rgba(126,132,112,.24));
  border-radius: 8px;
  padding: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.035), transparent 26%),
    rgba(6, 8, 6, .48);
}

.mrg-comma-bridge-graph header {
  min-width: 0;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.mrg-comma-bridge-graph header span {
  color: var(--c-muted, #a9ad96);
  font-family: var(--f-mono);
  font-size: var(--font-mono-8);
  overflow-wrap: anywhere;
}

.mrg-comma-bridge-graph svg {
  width: 100%;
  min-height: 260px;
  max-height: 520px;
  display: block;
}

.mrg-bridge-bank {
  stroke: color-mix(in srgb, var(--c-border, rgba(126,132,112,.24)) 80%, transparent);
  stroke-width: 1.2;
  stroke-dasharray: 4 9;
}

.mrg-bridge-bank.is-middle {
  stroke: color-mix(in srgb, var(--c-accent, #b8be9e) 42%, transparent);
}

.mrg-bridge-bank-label,
.mrg-bridge-node text {
  fill: var(--c-muted, #a9ad96);
  font-family: var(--f-mono);
  font-size: 14px;
}

.mrg-bridge-node text {
  font-size: 12px;
  paint-order: stroke;
  stroke: rgba(6, 8, 6, .82);
  stroke-width: 2.4px;
}

.mrg-bridge-node circle {
  stroke: color-mix(in srgb, currentColor 34%, white);
  stroke-width: 1.2;
  filter: drop-shadow(0 0 7px rgba(255,255,255,.12));
}

.mrg-bridge-edge {
  fill: none;
  stroke-linecap: round;
  filter: drop-shadow(0 0 5px rgba(255,255,255,.08));
}

.mrg-bridge-edge.is-mirror-ratio-2 {
  filter: drop-shadow(0 0 9px rgba(255,255,255,.18));
}

.mrg-word-tree {
  display: block !important;
  max-height: none !important;
}

.mrg-word-flow {
  grid-column: 1 / -1;
  min-width: 0;
  display: grid;
  gap: 8px;
}

.mrg-word-bridge-graph {
  grid-column: 1 / -1;
  min-width: 0;
  display: grid;
  gap: 6px;
  border: 1px solid var(--c-border, rgba(126,132,112,.24));
  border-radius: 8px;
  padding: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.03), transparent 28%),
    rgba(6, 8, 6, .48);
}

.mrg-word-bridge-graph header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.mrg-word-bridge-graph header button {
  border: 1px solid var(--c-border, rgba(126,132,112,.24));
  border-radius: 8px;
  padding: 5px 9px;
  color: var(--c-text, #eef0df);
  background: rgba(255,255,255,.06);
  font-family: var(--f-mono);
  font-size: var(--font-mono-8);
  cursor: pointer;
}

.mrg-word-bridge-graph header span {
  color: var(--c-muted, #a9ad96);
  font-family: var(--f-mono);
  font-size: var(--font-mono-8);
}

.mrg-word-bridge-graph > div {
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
}

.mrg-word-bridge-graph svg {
  min-width: 1000px;
  width: max(100%, 1000px);
  min-height: 260px;
  display: block;
}

.mrg-word-bridge-zero-axis {
  stroke: color-mix(in srgb, var(--c-accent, #b8be9e) 30%, transparent);
  stroke-width: 1;
  stroke-dasharray: 5 9;
}

.mrg-word-octave-line {
  stroke: color-mix(in srgb, var(--c-muted, #a9ad96) 24%, transparent);
  stroke-width: .8;
  stroke-dasharray: 2 10;
}

.mrg-word-octave-label {
  fill: color-mix(in srgb, var(--c-muted, #a9ad96) 82%, transparent);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0;
  paint-order: stroke;
  stroke: rgba(6, 8, 6, .86);
  stroke-width: 2px;
}

.mrg-word-weighted-baseline-base {
  fill: none;
  stroke: rgba(238, 240, 223, .22);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-opacity: .7;
  pointer-events: none;
}

.mrg-word-weighted-baseline-segment {
  fill: none;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-opacity: .82;
  filter: drop-shadow(0 0 9px rgba(255,255,255,.18));
  pointer-events: none;
}

.mrg-word-weighted-baseline text {
  fill: var(--c-text, #eef0df);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0;
  paint-order: stroke;
  stroke: rgba(6, 8, 6, .88);
  stroke-width: 2.2px;
}

.mrg-word-bridge-edge {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  filter: drop-shadow(0 0 4px rgba(255,255,255,.08));
}

.mrg-word-bridge-edge.is-zero {
  stroke-width: 3;
  filter: drop-shadow(0 0 8px rgba(255,255,255,.14));
}

.mrg-word-normalized-curve-base {
  fill: none;
  stroke: rgba(238, 240, 223, .38);
  stroke-width: 5.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-opacity: .72;
  filter: drop-shadow(0 0 8px rgba(238, 240, 223, .12));
  pointer-events: none;
}

.mrg-word-normalized-segment {
  fill: none;
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 9px rgba(255,255,255,.2));
  pointer-events: none;
}

.mrg-word-overlap-bridge path {
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 7 6;
  filter: drop-shadow(0 0 6px rgba(255,255,255,.12));
}

.mrg-word-overlap-bridge line {
  stroke-width: 1;
  stroke-dasharray: 2 7;
}

.mrg-word-overlap-bridge circle {
  stroke: rgba(238, 240, 223, .74);
  stroke-width: 1.1;
  filter: drop-shadow(0 0 7px rgba(255,255,255,.16));
}

.mrg-word-overlap-bridge text {
  fill: var(--c-text, #eef0df);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0;
  paint-order: stroke;
  stroke: rgba(6, 8, 6, .86);
  stroke-width: 2.2px;
}

.mrg-word-overlap-bridge.is-palindrome path {
  stroke-width: 3;
  stroke-dasharray: none;
}

.mrg-word-overlap-bridge.is-neutral path {
  filter: drop-shadow(0 0 10px rgba(238,240,223,.18));
}

.mrg-word-overlap-bridge.is-same-source circle {
  stroke-width: 1.8;
}

.mrg-word-bridge-node text,
.mrg-word-bridge-mid text {
  fill: var(--c-muted, #a9ad96);
  font-family: var(--f-mono);
  font-size: 12px;
  paint-order: stroke;
  stroke: rgba(6, 8, 6, .82);
  stroke-width: 2.4px;
}

.mrg-word-bridge-node.is-zero text,
.mrg-word-bridge-mid.is-zero text {
  fill: var(--c-text, #eef0df);
}

.mrg-word-bridge-node circle,
.mrg-word-bridge-mid circle {
  stroke: color-mix(in srgb, currentColor 34%, white);
  stroke-width: 1.2;
  filter: drop-shadow(0 0 7px rgba(255,255,255,.12));
}

.mrg-word-token {
  min-width: 0;
  min-height: 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--c-border, rgba(126,132,112,.24));
  border-radius: 8px;
  padding: 5px 8px;
  background: rgba(6, 8, 6, .62);
}

.mrg-word-run-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(var(--token-count), minmax(89px, 1fr));
  grid-auto-rows: minmax(55px, auto);
  gap: 8px;
  border: 1px solid var(--c-border, rgba(126,132,112,.24));
  border-radius: 8px;
  padding: 8px;
  background: rgba(8, 10, 8, .38);
  overflow-x: auto;
}

.mrg-word-grid-cell {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 8px;
  border: 1px solid var(--c-border, rgba(126,132,112,.24));
  border-radius: 8px;
  padding: 8px;
  background: rgba(8, 10, 8, .38);
}

.mrg-word-edge-cell {
  opacity: .88;
}

.mrg-word-edge-cell.is-empty {
  visibility: hidden;
}

.mrg-word-run-card {
  min-width: 0;
  display: grid;
  gap: 2px;
  border: 1px solid var(--c-border-hi, rgba(184,190,158,.66));
  border-radius: 8px;
  padding: 5px 8px;
  background: rgba(44, 52, 37, .52);
}

.mrg-word-run-card.is-zone {
  border-color: var(--c-accent, #b8be9e);
  background: rgba(44, 52, 37, .72);
}

.mrg-word-run-card span {
  color: var(--c-muted, #a9ad96);
  font-family: var(--f-mono);
  font-size: var(--font-mono-8);
}

.mrg-word-run-card strong,
.mrg-word-run-card code,
.mrg-word-run-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mrg-word-run-card strong {
  color: var(--c-accent, #b8be9e);
  font-family: var(--f-display);
  font-size: var(--font-body-13);
}

.mrg-word-run-card code,
.mrg-word-run-card small {
  color: var(--c-muted, #a9ad96);
  font-family: var(--f-mono);
  font-size: var(--font-mono-8);
}

.mrg-word-zone-span {
  border-color: var(--c-accent, #b8be9e);
  background: rgba(44, 52, 37, .72);
}

.mrg-word-zone-span span,
.mrg-word-edge-cell span {
  color: var(--c-muted, #a9ad96);
  font-family: var(--f-mono);
  font-size: var(--font-mono-8);
}

.mrg-word-zone-span strong,
.mrg-word-edge-cell strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--c-accent, #b8be9e);
  font-family: var(--f-display);
  font-size: var(--font-body-13);
}

.mrg-word-zone-span code,
.mrg-word-zone-span small,
.mrg-word-edge-cell code {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--c-muted, #a9ad96);
  font-family: var(--f-mono);
  font-size: var(--font-mono-8);
}

.mrg-word-polarity {
  min-width: 0;
  overflow-x: auto;
}

.mrg-word-polarity table {
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 5px;
}

.mrg-word-polarity td {
  min-width: 55px;
  border: 1px solid var(--c-border, rgba(126,132,112,.24));
  border-radius: 5px;
  padding: 5px 8px;
  color: var(--c-muted, #a9ad96);
  background: rgba(6, 8, 6, .52);
  font-family: var(--f-mono);
  font-size: var(--font-mono-8);
  white-space: nowrap;
}

.mrg-word-polarity td:first-child {
  color: var(--c-accent, #b8be9e);
}

.mrg-word-polarity-label td {
  color: var(--c-text, #eef0df);
  background: rgba(44, 52, 37, .42);
}

.mrg-word-token.is-grid {
  border-color: var(--c-accent, #b8be9e);
  box-shadow: inset 0 0 13px rgba(184,190,158,.12);
}

.mrg-word-token strong,
.mrg-word-token code,
.mrg-word-token span,
.mrg-word-token small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mrg-word-token small {
  color: var(--c-muted, #a9ad96);
  font-family: var(--f-mono);
  font-size: var(--font-mono-8);
}

.mrg-word-tree li {
  min-width: 100%;
  margin-bottom: 3px;
}

.mrg-word-tree ol {
  display: block;
  max-height: none;
  overflow: visible;
}

.mrg-word-literal-paths {
  display: grid;
  gap: 0.35rem;
  margin: 0.75rem 0;
}

.mrg-word-literal-paths div {
  display: grid;
  grid-template-columns: minmax(5.5rem, 8rem) minmax(0, 1fr);
  gap: 0.5rem;
  align-items: start;
}

.mrg-word-literal-paths span {
  color: var(--c-muted, #a9ad96);
  font-size: var(--font-mono-8);
  text-transform: uppercase;
}

.mrg-word-literal-paths code {
  white-space: normal;
  overflow-wrap: anywhere;
}

.mrg-grid-cell.is-source {
  outline: 2px solid var(--c-accent, #b8be9e);
  outline-offset: -2px;
}

.mrg-grid-cell.is-target {
  outline: 2px solid var(--c-warn, #c88d31);
  outline-offset: -2px;
}

.mrg-grid-corner,
.mrg-grid-colhead,
.mrg-grid-rowhead {
  color: var(--c-accent, #b8be9e);
  background:
    linear-gradient(var(--c-control, transparent), var(--c-control, transparent)),
    var(--c-surface-layer-1, rgba(25,28,24,.78));
  font-family: var(--f-display);
  font-size: var(--font-mono-13);
}

.mrg-grid-rowhead {
  grid-template-columns: 21px minmax(0, 1fr);
  gap: 3px;
  padding-inline: 5px;
}

.mrg-grid-rowhead strong,
.mrg-grid-colhead strong {
  font-weight: 400;
}

.mrg-grid-rowhead span {
  color: var(--c-muted, #a9ad96);
  font-family: var(--f-mono);
  font-size: var(--font-mono-8);
}

.mrg-grid-cell span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--c-text, #e2e2d3);
  font-family: var(--f-mono);
  font-size: var(--font-mono-8);
}

.mrg-grid-cell small {
  position: absolute;
  right: 3px;
  bottom: 1px;
  max-width: 34px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--c-accent, #b8be9e);
  font-family: var(--f-mono);
  font-size: 7px;
  line-height: 1;
  opacity: .84;
}

.mrg-grid-cell.ring-21 {
  border-color: color-mix(in srgb, var(--c-border, rgba(126,132,112,.24)) 80%, transparent);
  opacity: .82;
}

.mrg-grid-cell.ring-34 {
  border-color: var(--c-border-hi, rgba(184,190,158,.66));
  background: rgba(28, 34, 25, .74);
  opacity: .94;
}

.mrg-grid-cell.ring-55 {
  border-color: var(--c-accent, #b8be9e);
  background: rgba(44, 52, 37, .84);
  box-shadow: inset 0 0 13px rgba(184,190,158,.16);
}

.mrg-grid-cell.is-mismatch {
  border-color: var(--c-warn, #c88d31);
  color: var(--c-warn, #c88d31);
  box-shadow: inset 0 0 13px rgba(200,141,49,.24);
}

.mrg-grid-cell.is-hit-node {
  border-color: color-mix(in srgb, var(--c-accent, #b8be9e) 74%, var(--c-border, rgba(126,132,112,.24)));
  background:
    linear-gradient(135deg, rgba(184,190,158,.18), transparent 62%),
    rgba(9, 14, 10, .84);
  box-shadow: inset 0 0 13px rgba(184,190,158,.18);
}

.mrg-grid-cell.is-crossing {
  border-color: var(--c-accent, #b8be9e);
  background:
    linear-gradient(135deg, rgba(184,190,158,.24), rgba(200,141,49,.16)),
    rgba(10, 15, 10, .9);
  box-shadow:
    inset 0 0 21px rgba(184,190,158,.22),
    0 0 8px rgba(184,190,158,.14);
}

.mrg-grid-cell.is-grid-hit span {
  color: #f1f5c9;
}

.mrg-grid-cell.is-symbol-hit span {
  color: #d7e8ff;
}

.mrg-grid-cell.is-profile-hit span {
  color: #d8ffc8;
}

.vaticanus-view {
  display: grid;
  gap: 13px;
  padding: 13px;
}

.vaticanus-toolbar {
  display: grid;
  grid-template-columns: minmax(377px, 1fr) 55px 55px 89px;
  gap: 8px;
  align-items: stretch;
}

.vaticanus-toolbar form {
  display: grid;
  grid-template-columns: 55px minmax(0, 1fr) 89px;
  gap: 8px;
}

.vaticanus-toolbar label,
.vaticanus-toolbar input,
.vaticanus-toolbar button,
.vaticanus-stats div,
.vaticanus-page-stats div {
  min-height: 34px;
  border: 1px solid var(--c-border, rgba(126,132,112,.24));
  border-radius: 8px;
  background: rgba(13,15,13,.72);
  color: var(--c-text, #e2e2d3);
}

.vaticanus-toolbar label,
.vaticanus-toolbar button {
  display: grid;
  place-items: center;
  font-family: var(--f-mono);
  font-size: var(--font-mono-8);
  text-transform: uppercase;
}

.vaticanus-toolbar button {
  cursor: pointer;
}

.vaticanus-toolbar input {
  width: 100%;
  padding: 0 13px;
  font: inherit;
}

.vaticanus-stats,
.vaticanus-page-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.vaticanus-stats div,
.vaticanus-page-stats div {
  display: grid;
  gap: 3px;
  align-content: center;
  padding: 8px;
}

.vaticanus-stats strong,
.vaticanus-page-stats strong {
  font-family: var(--f-display);
  font-size: var(--font-body-21);
  font-weight: 400;
}

.vaticanus-stats span,
.vaticanus-page-stats span {
  color: var(--c-muted, #a9ad96);
  font-family: var(--f-mono);
  font-size: var(--font-mono-8);
  text-transform: uppercase;
}

.vaticanus-wave {
  min-height: 110px;
  display: flex;
  align-items: end;
  gap: 2px;
  padding: 8px;
  overflow-x: auto;
  border: 1px solid var(--c-border, rgba(126,132,112,.24));
  border-radius: 8px;
  background: rgba(8,10,8,.62);
}

.vaticanus-wave-bar {
  flex: 0 0 5px;
  height: 89px;
  display: grid;
  align-items: end;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.vaticanus-wave-bar span {
  display: block;
  height: var(--h, 8px);
  border-radius: 2px 2px 0 0;
  background: var(--c-muted, #a9ad96);
  opacity: .62;
}

.vaticanus-wave-bar:hover span,
.vaticanus-wave-bar.is-active span {
  background: var(--c-accent, #b8be9e);
  opacity: 1;
  box-shadow: 0 0 8px rgba(184,190,158,.55);
}

.vaticanus-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(377px, .8fr);
  gap: 13px;
  min-height: 0;
}

.vaticanus-text-panel,
.vaticanus-bridge-panel {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  border: 1px solid var(--c-border, rgba(126,132,112,.24));
  border-radius: 8px;
  background: rgba(13,15,13,.72);
  padding: 13px;
}

.vaticanus-text-panel header,
.vaticanus-bridge-panel header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 13px;
}

.vaticanus-text-panel header strong,
.vaticanus-bridge-panel header strong {
  font-family: var(--f-display);
  font-size: var(--font-body-21);
  font-weight: 400;
}

.vaticanus-text-panel header span,
.vaticanus-bridge-panel header span {
  color: var(--c-muted, #a9ad96);
  font-family: var(--f-mono);
  font-size: var(--font-mono-8);
}

.vaticanus-text-panel pre {
  min-height: 610px;
  max-height: 70vh;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--c-text, #e2e2d3);
  font-family: var(--f-content);
  font-size: var(--font-body-13);
  line-height: 1.6;
}

.vaticanus-bridge-panel {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.vaticanus-bridge-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--f-mono);
  font-size: var(--font-mono-8);
}

.vaticanus-bridge-table th,
.vaticanus-bridge-table td {
  padding: 6px 5px;
  border-bottom: 1px solid var(--c-border, rgba(126,132,112,.24));
  text-align: left;
  vertical-align: top;
}

.vaticanus-bridge-table code {
  color: var(--c-accent, #b8be9e);
  font-family: var(--f-display);
  font-size: var(--font-body-13);
}

.vaticanus-bridge-panel textarea {
  min-height: 144px;
  width: 100%;
  resize: vertical;
  border: 1px solid var(--c-border, rgba(126,132,112,.24));
  border-radius: 8px;
  background: rgba(5,6,5,.7);
  color: var(--c-muted, #a9ad96);
  font-family: var(--f-mono);
  font-size: var(--font-mono-8);
  padding: 8px;
}

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

  .mws-shell {
    min-width: 987px;
  }

  .vaticanus-toolbar,
  .vaticanus-layout,
  .vaticanus-stats,
  .vaticanus-page-stats {
    grid-template-columns: minmax(0, 1fr);
  }

  .vaticanus-toolbar form {
    grid-template-columns: 55px minmax(0, 1fr) 89px;
  }
}
